Advertisement
belenguer

Mostrar arrat de enlaces de menus

Dec 2nd, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. if (!function_exists('debug_admin_menus')):
  2. function debug_admin_menus() {
  3. if ( !is_admin())
  4. return;
  5. global $submenu, $menu, $pagenow;
  6. if ( current_user_can('manage_options') ) { // ONLY DO THIS FOR ADMIN
  7. if( $pagenow == 'index.php' ) { // PRINTS ON DASHBOARD
  8. echo '<pre>'; print_r( $menu ); echo '</pre>'; // TOP LEVEL MENUS
  9. echo '<pre>'; print_r( $submenu ); echo '</pre>'; // SUBMENUS
  10. }
  11. }
  12. }
  13. add_action( 'admin_notices', 'debug_admin_menus' );
  14. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement