1 、禁用修訂版本和自動草稿在 wp-config.php
文件中設置 WP_POST_REVISIONS
為 false
,有就直接改,沒有就添加。
define('WP_POST_REVISIONS', false);
2 、刪除掉儀表盤的小工具,添加到主題或子主題的 function.php
,需要刪除的項目可以按需調整
/**
* Remove WordPress Dashboard Widgets
*
*/
add_action( 'wp_dashboard_setup', 'wei33010_disable_dashboard_widgets' );
function wei33010_disable_dashboard_widgets()
{
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); // Incoming Links
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' ); // Plugins
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); // Quick Press
remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); // Recent Drafts
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); // WordPress blog
remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' ); // Other WordPress News
remove_action( 'welcome_panel', 'wp_welcome_panel' ); // Remove WordPress Welcome Panel
}
3 、不想用代碼就用插件
Disable WordPress Events and News Dashboard Widget
Disable Gutenberg Autosave