OCUALTAR NOTIFICACIONES EN WORDPRESS

function hide_notices_dashboard() {
global $wp_filter;

if ( is_network_admin() and isset($wp_filter[‘network_admin_notices’]) ) {
unset( $wp_filter[‘network_admin_notices’] );
} elseif( is_user_admin() && isset($wp_filter[‘user_admin_notices’]) ) {
unset( $wp_filter[‘user_admin_notices’] );
} else {
if ( isset($wp_filter[‘admin_notices’]) ) {
unset( $wp_filter[‘admin_notices’] );
}
}

if ( isset($wp_filter[‘all_admin_notices’]) ) {
unset( $wp_filter[‘all_admin_notices’] );
}
}
add_action( ‘admin_init’, ‘hide_notices_dashboard’ );

add_action(‘after_setup_theme’, ‘remove_core_updates’);

function remove_core_updates() {
if (!current_user_can(‘update_core’)) {
return;
}
add_action(‘init’, create_function(‘$a’, “remove_action( ‘init’, ‘wp_version_check’ );”), 2);
add_filter(‘pre_option_update_core’, ‘__return_null’);
add_filter(‘pre_site_transient_update_core’, ‘__return_null’);
}

remove_action(‘load-update-core.php’, ‘wp_update_plugins’);
add_filter(‘pre_site_transient_update_plugins’, ‘__return_null’);

remove_action(‘load-update-core.php’, ‘wp_update_themes’);
add_filter(‘pre_site_transient_update_themes’, create_function(‘$a’, “return null;”));

Entradas relacionadas