[Plugin: Dashboard Tweaks] WP Submenu Drop Down not removed
-
This piece of code:
function sl_dashboard_tweaks_render() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'id' => 'wp-logo', 'title' => '<span class="sl-dashboard-logo"></span>', 'href' => is_admin() ? home_url( '/' ) : admin_url(), 'meta' => array( 'title' => __('Visit the Frontend of your website'), ), ) ); $wp_admin_bar->remove_menu('about'); $wp_admin_bar->remove_menu('wporg'); $wp_admin_bar->remove_menu('documentation'); $wp_admin_bar->remove_menu('support-forums'); $wp_admin_bar->remove_menu('feedback'); $wp_admin_bar->remove_menu('view-site'); } add_action( 'wp_before_admin_bar_render', 'sl_dashboard_tweaks_render' );
removes each of the submenu items, but the drop down is still there. And the warning “Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\test3_3\wp-includes\class-wp-admin-bar.php on line 245” is in the drop down.
Thanks
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘[Plugin: Dashboard Tweaks] WP Submenu Drop Down not removed’ is closed to new replies.