// 隱藏後台控制台的widgets
function example_remove_dashboard_widgets() {

global $wp_meta_boxes;

        //Main column
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']); //wordpress 網誌
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); //其他wordpres 新聞
}
 
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );

文章標籤

JEFF 發表在 痞客邦 留言(1) 人氣()