axxe16
7/7/2017 - 1:55 PM

rimuovere uno o più elementi dalla barra di wp. Rif. https://digwp.com/2011/04/admin-bar-tricks/

rimuovere uno o più elementi dalla barra di wp. Rif. https://digwp.com/2011/04/admin-bar-tricks/

<?php
// remove links/menus from the admin bar
function mytheme_admin_bar_render() {
	global $wp_admin_bar;
	$wp_admin_bar->remove_menu('comments');
}
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );


/*
my-account – link to your account (avatars disabled)
my-account-with-avatar – link to your account (avatars enabled)
my-blogs – the "My Sites" menu if the user has more than one site
get-shortlink – provides a Shortlink to that page
edit – link to the Edit/Write-Post page
new-content – link to the "Add New" dropdown list
comments – link to the "Comments" dropdown
appearance – link to the "Appearance" dropdown
updates – the "Updates" dropdown
*/