Tắt thông báo cập nhật, tắt tự động cập nhật, tắt nút cập nhật plugin
remove_action( 'load-update-core.php', 'wp_update_plugins' ); add_filter('pre_site_transient_update_core','remove_core_updates'); //Disable automatic theme updates add_filter( 'auto_update_theme', '__return_false' ); //Disable theme update notifications add_filter('pre_site_transient_update_themes','remove_core_updates'); add_filter('site_transient_update_plugins', 'remove_update_notification'); function remove_update_notification($value) { unset($value->response[ plugin_basename(__FILE__) ]); return $value; } //Disable automatic plugin updates add_filter( 'auto_update_plugin', '__return_false' ); //Disable plugin update notifications add_filter('pre_site_transient_update_plugins','remove_core_updates'); //Disable individual plugin update notification add_filter('site_transient_update_plugins', function ($value) { unset($value->response[ plugin_basename(__FILE__) ]);return $value; }); //Disable update emails add_filter( 'auto_core_update_send_email', '__return_false' ); add_filter( 'http_request_args', 'dm_prevent_update_check', 10, 2 ); function dm_prevent_update_check( $r, $url ) { if ( 0 === strpos( $url, 'http://api.wordpress.org/plugins/update-check/' ) ) { $my_plugin = plugin_basename( __FILE__ ); $plugins = unserialize( $r['body']['plugins'] ); unset( $plugins->plugins[$my_plugin] ); unset( $plugins->active[array_search( $my_plugin, $plugins->active )] ); $r['body']['plugins'] = serialize( $plugins ); } return $r; }