Created
March 16, 2014 04:54
-
-
Save nicholasohrn/9578743 to your computer and use it in GitHub Desktop.
This file contains 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 | |
function at_a_glance_override() { | |
ob_start(); | |
wp_dashboard_right_now(); | |
$contents = ob_get_clean(); | |
echo preg_replace('#.*themes\.php.*#', '', $contents); | |
} | |
function wp_dashboard_setup_at_a_glance_override() { | |
if(is_blog_admin() && current_user_can('edit_posts')) { | |
remove_meta_box('dashboard_right_now', get_current_screen(), 'normal'); | |
wp_add_dashboard_widget('dashboard_right_now_override', __('At a Glance'), 'at_a_glance_override'); | |
} | |
} | |
add_action('wp_dashboard_setup', 'wp_dashboard_setup_at_a_glance_override'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't quite work. All the links are present but the formatting and icons are all removed. Any ideas on how to rectify this? Thanks.