搜索一下,你就知道

< 返回
当前位置:
打印

禁止WordPress通知信息

目录
/*network_admin_notices (for network admin--aka super admin. You don't want to remove these.)*/
/*user_admin_notices(for site admin)*/
/*admin_notices (for other users)*/
/*Disable admin notic*/
function my_hide_notices_to_all_but_super_admin(){
remove_all_actions( 'user_admin_notices' );
remove_all_actions( 'network_admin_notices' );
remove_all_actions( 'admin_notices' );

}
add_action('in_admin_header', 'my_hide_notices_to_all_but_super_admin', 99);

/*Disable update notic*/
function remove_core_updates(){
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');
登录

还没有账户?

开始输入你要找的文章。
微信

微信号:hackenwu

商店
0 项目 购物车