add_action( 'login_footer', function () {
remove_action( 'login_footer', 'wp_shake_js', 12 );
} );
Admin Panel
Remove Update option from admin bar
function snipjar_remove_from_admin_bar($wp_admin_bar) {
$wp_admin_bar->remove_node('updates');
}
add_action('admin_bar_menu', 'snipjar_remove_from_admin_bar', 999);
Remove New Content option from admin bar
function snipjar_remove_from_admin_bar($wp_admin_bar) {
$wp_admin_bar->remove_node('new-content');
}
add_action('admin_bar_menu', 'snipjar_remove_from_admin_bar', 999);
Remove Comment option from admin bar
function snipjar_remove_from_admin_bar($wp_admin_bar) {
$wp_admin_bar->remove_node('comments');
}
add_action('admin_bar_menu', 'snipjar_remove_from_admin_bar', 999);
Remove WP Logo icon from admin bar
function snipjar_remove_from_admin_bar($wp_admin_bar) {
$wp_admin_bar->remove_node('wp-logo');
}
add_action('admin_bar_menu', 'snipjar_remove_from_admin_bar', 999);
Move admin bar to the bottom
body {margin-top: -28px;padding-bottom: 28px;}
body.admin-bar #wphead {padding-top: 0;}
body.admin-bar #footer {padding-bottom: 28px;}
#wpadminbar { top: auto !important;bottom: 0;}
#wpadminbar .menupop .ab-sub-wrapper { bottom: 32px; }
Add custom CSS in the Admin dashboard
Add custom CSS in the WordPress admin head. Add the CSS code between the style tags.
add_action( 'admin_head', function() {
?>
<style>
</style>
<?php
} );
Remove dashboard welcome panel
add_action(
'admin_init',
function () {
remove_action( 'welcome_panel', 'wp_welcome_panel' );
}
);
Change “Howdy” text in the admin bar
function snipjar_change_howdy( $wp_admin_bar ) {
// Edit the line below to set what you want the admin bar to display intead of "Howdy,".
$new_howdy = 'Welcome,';
$my_account = $wp_admin_bar->get_node( 'my-account' );
$wp_admin_bar->add_node(
array(
'id' => 'my-account',
'title' => str_replace( 'Howdy,', $new_howdy, $my_account->title ),
)
);
}
add_filter( 'admin_bar_menu', 'snipjar_change_howdy', 25 );
Change admin panel footer text
add_filter(
'admin_footer_text',
function ( $footer_text ) {
$footer_text = 'Brought to you by by <a href="https://www.snipjar.com" target="_blank" rel="noopener">Snipjar</a>';
return $footer_text;
}
);
Disable WordPress Admin Bar for all users
add_filter( 'show_admin_bar', '__return_false' );