/** * disable autoupdate */ // включить автоматические обновления тем add_filter( 'auto_update_theme', '__return_true' ); // включить автоматические обновления переводов add_filter( 'auto_update_translation', '__return_true' ); // отключить емайл-уведомления об установке новых версий apply_filters( 'auto_core_update_send_email', '__return_false' ); // отключить автоматические обновления плагинов add_filter( 'auto_update_plugin', '__return_false' ); // Отключить обновления всем, кроме администратора function disable_updates() { global $wp_version; return (object) array( 'last_checked' => time(), 'version_checked' => $wp_version, ); } add_action( 'init', function () { if ( ! current_user_can( 'administrator' ) ) { add_filter( 'pre_site_transient_update_core', 'disable_updates' ); // Disable WordPress core updates add_filter( 'pre_site_transient_update_plugins', 'disable_updates' ); // Disable WordPress plugin updates add_filter( 'pre_site_transient_update_themes', 'disable_updates' ); // Disable WordPress theme updates } } ); or v2 > Script Organizer > Admin Only /* ************************************ WP Auto Update disable ************************************* */ /** * disable autoupdate */ define( 'WP_AUTO_UPDATE_CORE', false ); add_filter( 'auto_update_plugin', '__return_false' ); add_filter( 'auto_update_theme', '__return_false' ); // disable to all except admin user function restrict_excerpt_to_administrators() { if ( ! current_user_can( 'administrator' ) ) { remove_post_type_support( 'post', 'excerpt' ); } } add_action( 'admin_init', 'restrict_excerpt_to_administrators' ); function disable_excerpt() { return ''; } add_filter( 'excerpt_length', 'disable_excerpt' );
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter