2010-03-05, 00:57:23
I would recommend the following. be careful: that's not the best option but a workaround for the problem.
1. change the implementation of createNavTab, add the name of the plugin as first parameter
2. add a hook
3. declare a function:
this solution is only a workaround! i think, the plugin developer should not take care of the view representation of the tab. the better way would be to take selectors like ... and ...
1. change the implementation of createNavTab, add the name of the plugin as first parameter
Code:
function createNavTab($plugin, $url,$txt) {
echo "<li><a href='".$url."' class='".$plugin."' />";
echo $txt;
echo "</a></li>";
}
2. add a hook
Code:
add_action('nav-tab', 'createNavTab', array('myplugin', 'myplugin.php','My Plugin'));
add_action('header', 'mypluginAdminCSS', array());
3. declare a function:
Code:
function mypluginAdminCSS() {
echo '
<style type="text/css">
#myplugin .wrapper .nav li a.myplugin { color:#182227; background: #F9F9F9; font-weight:bold !important; }
</style>
';
}
this solution is only a workaround! i think, the plugin developer should not take care of the view representation of the tab. the better way would be to take selectors like ... and ...
Code:
.wrapper .nav li.active a
.wrapper .nav li a