public
Last active

WordPress Expanded Admin Menus

  • Download Gist
expand-admin-menus.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<?php
/**
* Plugin Name:
* Plugin URI: http://xavisys.com/wordpress-plugins/expanded-admin-menus/
* Description: Forces all admin menus to be expanded all the time
* Version: 0.0.1
* Author: Aaron D. Campbell
* Author URI: http://xavisys.com/
*/
 
function bd_expand_admin_menus() {
?>
<script type="text/javascript">
jQuery('#adminmenu>li.wp-not-current-submenu').addClass('wp-has-current-submenu no-arrow').removeClass('wp-not-current-submenu');
</script>
<?php
}
 
add_action( 'adminmenu', 'bd_expand_admin_menus' );
 
function bd_expanded_admin_menus_head() {
?>
<style type="text/css">
#adminmenu li.no-arrow .wp-menu-arrow {
display: none;
}
</style>
<?php
}
 
add_action( 'admin_head', 'bd_expanded_admin_menus_head' );

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.