custom_remove_happy_addons_admin_bar_link

function custom_remove_happy_addons_admin_bar_link( $wp_admin_bar ) { if ( ! current_user_can( ‘manage_options’ ) ) { return; } $wp_admin_bar->remove_menu(‘happy-addons’); } add_action( ‘admin_bar_menu’, ‘custom_remove_happy_addons_admin_bar_link’, 999 );Continue reading

custom_remove_comments_admin_bar_links

function custom_remove_comments_admin_bar_links() { global $wp_admin_bar; if ( ! method_exists( $wp_admin_bar, ‘remove_menu’ ) ) { return; // Ensures $wp_admin_bar is an object with the remove_menu method. } $wp_admin_bar->remove_menu(‘comments’); } add_action( ‘admin_bar_menu’, ‘custom_remove_comments_admin_bar_links’, 1000 );Continue reading

custom_remove_userregistration_admin_bar_links

function custom_remove_ur_admin_bar_links( $wp_admin_bar ) { $wp_admin_bar->remove_menu(‘user-registration-menu’); $wp_admin_bar->remove_menu(‘ur-edit-form’); $wp_admin_bar->remove_menu(‘user-registration-all-forms’); $wp_admin_bar->remove_menu(‘user-registration-add-new’); $wp_admin_bar->remove_menu(‘user-registration-settings’); $wp_admin_bar->remove_menu(‘user-registration-docs’); } // The priority should be higher than the one used by the plugin. add_action( ‘user_registration_top_admin_bar_menu’, ‘custom_remove_ur_admin_bar_links’, 1000 );Continue reading