Chặn cập nhật và cài plugin sửa theme trên wordpress

Chặn update core. và sửa plugin + theme. Chèn code vào wp

define( 'DISALLOW_FILE_EDIT', true ); //Not allow edit plugin or theme
//define('DISALLOW_FILE_MODS',true); //Not allow install plugin and theme
define( 'WP_AUTO_UPDATE_CORE', false );

Chặn thông báo. Chèn vào file functions.php trong theme

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' );

Done.

Leave a Reply

Your email address will not be published. Required fields are marked *