Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nicholasohrn/9578743 to your computer and use it in GitHub Desktop.
Save nicholasohrn/9578743 to your computer and use it in GitHub Desktop.
<?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');
@codeclinic
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment