aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views/default/embed/link.php
blob: dc3b3313e75d9c3792d906bf7f40b34e6359810f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
 * Displays an "Embed media" link in longtext inputs.
 */

// yeah this is naughty.  embed and ecml might want to merge.
if (elgg_is_active_plugin('ecml')) {
	$active_section = 'active_section=web_services&';
} else {
	$active_section = '';
}

$url = "pg/embed/?{$active_section}internal_name={$vars['name']}";

echo elgg_view('output/url', array(
	'href' => $url,
	'text' => elgg_echo('media:insert'),
	'rel' => 'facebox',
	'class' => 'elgg-longtext-control',
));