Last active
December 1, 2025 20:48
-
-
Save nathaningram/3f2fbc7b185ca4ecc1d7faa596da5da2 to your computer and use it in GitHub Desktop.
Starter Site 2025 - MU Dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Custom Dashboard Functions | |
| Description: Customize the WP Admin | |
| Version: 1.0 | |
| Plugin URI: https://wpnathan.com | |
| Author: Nathan Ingram | |
| Author URI: https://wpnathan.com | |
| License: GPL2 | |
| */ | |
| // Security Check | |
| if (!defined('ABSPATH')) { | |
| die(); | |
| } | |
| // Replace Howdy | |
| function ni_replace_howdy( $wp_admin_bar ) { | |
| $my_account=$wp_admin_bar->get_node('my-account'); | |
| $newtitle = str_replace( 'Howdy,', 'Welcome,', $my_account->title ); | |
| $wp_admin_bar->add_node( array( | |
| 'id' => 'my-account', | |
| 'title' => $newtitle, | |
| ) ); | |
| } | |
| add_filter( 'admin_bar_menu', 'ni_replace_howdy',25 ); | |
| // Remove WP Dashboard Menu Completely | |
| function ni_admin_bar_remove() { | |
| global $wp_admin_bar; | |
| $wp_admin_bar->remove_menu('wp-logo'); | |
| } | |
| add_action('wp_before_admin_bar_render', 'ni_admin_bar_remove', 0); | |
| // Remove Dashboard Widgets | |
| function ni_remove_dashboard_widgets() { | |
| global $wp_meta_boxes; | |
| // Activity Widget | |
| unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); | |
| // At a Glance Widget | |
| unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); | |
| // Quick Draft Widget | |
| unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); | |
| // News Widget | |
| unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']) ; | |
| //Site Health | |
| unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_site_health']); | |
| //Events Calendar | |
| unset( $wp_meta_boxes['dashboard']['normal']['core']['tribe_dashboard_widget'] ); | |
| //WooSetup | |
| unset( $wp_meta_boxes['dashboard']['normal']['high']['wc_admin_dashboard_setup'] ); | |
| } | |
| add_action('wp_dashboard_setup', 'ni_remove_dashboard_widgets',11); | |
| // Disable Site Health Admin Menu | |
| function ni_remove_site_health_menu() { | |
| remove_submenu_page( 'tools.php', 'site-health.php' ); | |
| } | |
| add_action( 'admin_menu', 'ni_remove_site_health_menu' ); | |
| // Modify the Footer Thank You Text | |
| add_filter('admin_footer_text', 'ni_modify_footer_admin'); | |
| function ni_modify_footer_admin () { | |
| echo '<div style="float:left;margin-right:8px;""> | |
| <img src="//nathaningram-archive.s3.amazonaws.com/icons/brilliant-bulb.svg" height="32" width="32"> | |
| </div> | |
| <div style="height:8px;"> </div> | |
| <span><a href="https://brilliantly.net" target="_blank" style="color:#555d66;text-decoration:none;font-weight:bold;">Brilliant Web Works</a> – Custom WordPress Management System</span>'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment