< 返回
当前位置:
打印

禁止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');
上一篇 火车头采集产品导入woocommerce+SEO yoast
下一篇 移除Nitropack页脚标志
目录

登录

还没有账户?

商店
0 项目 购物车