webimpian
5/5/2018 - 2:21 PM

Remove unnecessary menu & node on admin bar

<?php

function remove_wp_logo( $wp_admin_bar ) {
	// $wp_admin_bar->remove_node( 'wp-logo' );
	$wp_admin_bar->remove_node( 'new-content' );
	$wp_admin_bar->remove_menu('comments');
	$wp_admin_bar->remove_menu('search');
	$wp_admin_bar->remove_menu('customize');
}
add_action( 'admin_bar_menu', 'remove_wp_logo', 999 );