Có thể bạn quan tâm

Remove dashboard widget API
Code sau đây sẽ giúp các bạn có thể remove dashboard widget ….
function mw_remove_dashboard_widgets() { // Globalize the metaboxes array, this holds all the widgets for wp-admin global $wp_meta_boxes; // Main column: unset($wp_meta_boxes['dashboard']['normal']['high']['dashboard_browser_nag']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); // Side Column: unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); } add_action('wp_dashboard_setup', 'mw_remove_dashboard_widgets' );
ok. Khi đã remove thành công thì chắc bạn cần Thêm dashboard widgets
Chúc các bạn thành công!
- Bình luận