not sure if this is the correct approach
Regardless of what the correct approach to adding an active
class to the li
element might be, adding a new navigation to the administrative backend is, beyond the shadow of a doubt, a very wrong approach in the first place.
Rather than doing that, familiarize yourself with how to manipulate the regular admin menus. Most likely, you want to be looking at the following functions:
add_menu_page()
& add_submenu_page()
or add_options_page()
Update, pertaining to comments
If restyling the entire backend is what you have in mind, deregister the following stylesheets: wp-admin, admin-bar, buttons, media-views, wp-auth-check & wp-pointer, like so:
function wpse114884_remove_admin_styles() {
wp_deregister_style( 'wp-admin' );
wp_deregister_style( 'admin-bar' );
wp_deregister_style( 'buttons' );
wp_deregister_style( 'media-views' );
wp_deregister_style( 'wp-auth-check' );
wp_deregister_style( 'wp-pointer' );
}
add_action ( 'admin_enqueue_scripts', 'wpse114884_remove_admin_styles' );
Have fun, it’ll be quite some work.
As for
It appears that the sidebar menu is #adminmenu, how do you target this to CSS? to rearrange?
-
Use Firebug or Chrome’s element inspector.
-
If you have to ask this question, I’d suggest letting go of the idea. But have fun playing around!