File: /home/workshopbrain/public_html/localleasing/wp-content/themes/MDIS/functions.php
<?php
//Replace howdy within the admin panel
function replace_howdy( $wp_admin_bar ) {
$my_account=$wp_admin_bar->get_node('my-account');
$newtitle = str_replace( 'Howdy,', 'Hello, welcome back! - ', $my_account->title );
$wp_admin_bar->add_node( array(
'id' => 'my-account',
'title' => $newtitle,
) );
}
add_filter( 'admin_bar_menu', 'replace_howdy',25 );
//Replace howdy within the admin panel end
//remove wordpress stuff from admin menu
function annointed_admin_bar_remove() {
global $wp_admin_bar;
/* Remove their stuff */
$wp_admin_bar->remove_menu('wp-logo');
$wp_admin_bar->remove_menu('new-content');
}
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);
//remove wordpress stuff from admin menu end
//hide help menu and screen options menu
function hide_help() {
echo '<style type="text/css">
#contextual-help-link-wrap { display: none !important; }
</style>';
}
add_action('admin_head', 'hide_help');
//hide help menu end
// hide administration page header logo and blavatar
function remove_admin_logo() {
echo '<style>#wp-admin-bar-wp-logo{ display: none; }
img.blavatar { display: none;}
#wpadminbar .quicklinks li div.blavatar {display:none;}
#wpadminbar .quicklinks li .blavatar {display:none;}
#wpadminbar #wp-admin-bar-new-content .ab-icon:before {display:none;}
#wpadminbar .quicklinks li .blavatar:before {display:none;}
</style>';
}
add_action('admin_head', 'remove_admin_logo');
// hide administration page header logo and blavatar end
//removing that stuff from the dashboard
function remove_dashboard_meta() {
remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );
remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );
}
add_action( 'admin_init', 'remove_dashboard_meta' );
//removing that stuff from the dashboard end
//more hides of the wordpress stuff
function b3m_login_logo_url_title() {
return 'MDIS Development by work.shop';
}
add_filter( 'login_headertitle', 'b3m_login_logo_url_title' );
function b3m_modify_footer_admin () {
echo '<span id="footer-thankyou">MDIS Development by <a href="http://www.workshop-mg.com" target="_blank">work.shop</a></span>';
}
add_filter('admin_footer_text', 'b3m_modify_footer_admin');
//more hides of the wordpress stuff end
//add custom widget within admin dashboard
function b3m_add_dashboard_widgets() {
wp_add_dashboard_widget('wp_dashboard_widget', 'work.shop MDIS Details', 'b3m_theme_info');
}
add_action('wp_dashboard_setup', 'b3m_add_dashboard_widgets' );
function b3m_theme_info() {
echo "
<ul>
<li><strong>Developed By:</strong> work.shop</li>
<li><strong>Website:</strong> <a href='http://workshop-mg.com' target='_blank'>www.workshop-mg.com</a></li>
<li><strong>Contact:</strong> <a href='mailto:michael@workshop-mg.com'>michael@workshop-mg.com</a></li>
<li><strong>Support:</strong> <a href='mailto:support@workshop-mg.com'>support@workshop-mg.com</a></li>
</ul>
";
}
//add custom widget within admin dashboard end
?>