2012-09-25, 21:40:25
Hello,
i think that it should be so:
Regards.
i think that it should be so:
Code:
<?php
/* Plugin Name: ViewSiteLink
Adds an obvious link in admin navigation that opens home page in new tab.
Version: 1.0
Author: Michel Staake
Author URI: http://michelstaake.me/
*/
$viewsitelink=basename(__FILE__, ".php");
register_plugin(
$viewsitelink,
'ViewSiteLink',
'1.0',
'Michel Staake',
'http://michelstaake.me/',
'Adds an obvious link in admin navigation that opens home page in new tab.',
'plugins',
'viewsitelink'
);
add_action('nav-tab','viewsitelink');
function viewsitelink() {
global $SITEURL;
echo '<li class="rightnav"><a target="_blank" class="first" href="'.$SITEURL.'" style="
border-radius: 3px;
margin-left: 3px;
border-left: none;
">View Site</a></li>';
}
?>
Regards.