New answers tagged

0

The below ads an action to Wordpress that is run when the admin menu is rendered. The admin menu is an array and all you're doing, here, is adding an array element that defines a separator, in the position you specify. From here: add_action( 'admin_menu', 'set_admin_menu_separator' ); function set_admin_menu_separator() { $position = 79; global $menu; $...


0

I improve the solution of @brasofilo as it is have small bug - on page reload with not best internet connection menu will appear for very short time. To avoid it I added a bit of more css: add_action('admin_head', 'wpse_52099_script_enqueuer'); function wpse_52099_script_enqueuer() { if(!current_user_can('administrator')) { echo <<<HTML <...



Top 50 recent answers are included