/* Menús de administración que SÍ se ven - El resto desaparecen */ add_action('admin_init', 'ayudawp_admin_init'); function ayudawp_admin_init() { // Menús que se quedan $menus_to_stay = array( // Escritorio 'index.php', // Entradas 'edit.php', // Medios 'upload.php', // Usuarios 'users.php', ); foreach ($GLOBALS['menu'] as $key => $value) { if (!in_array($value[2], $menus_to_stay)) remove_menu_page($value[2]); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter