Skip to content

Instantly share code, notes, and snippets.

@aaroncampbell
Created October 12, 2011 15:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaroncampbell/1281508 to your computer and use it in GitHub Desktop.
Save aaroncampbell/1281508 to your computer and use it in GitHub Desktop.
WordPress Expanded Admin Menus
<?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' );
@aaroncampbell
Copy link
Author

This is now available on the WordPress repository: http://wordpress.org/extend/plugins/expanded-admin-menus/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment