Tắt tự động auto update cập nhật plugin themes trong Wodpress

Thảo luận trong 'Mã nguồn mở Wordpress' bắt đầu bởi seolagi, 3/4/20.

  1. seolagi
    Tham gia ngày:
    16/4/14
    Bài viết:
    1,027
    Đã được thích:
    80
    Điểm thành tích:
    48
    Mình có 1 dãy hệ thống Wordpress nó hay tự động update các plugin nhiều khi tự động update themes làm lỗi themes rất khó chịu, bạn nào biết cách tắt tự động auto update cập nhật plugin themes trong Wodpress trọn bộ không giúp mình với, mình lên trên mạng xem cách tự động tắt plugin hoặc themes trên web mà nó cứ update ào ào bực ghê.
     
    Cảm ơn đã xem bài:

    Tắt tự động auto update cập nhật plugin themes trong Wodpress

  2. admin
    Tham gia ngày:
    22/5/13
    Bài viết:
    4,883
    Đã được thích:
    1,193
    Điểm thành tích:
    113
    Giới tính:
    Nam
    Bạn thử các code sau chèn vào tập tin function.php của themes xem như thế nào nhé, toàn tập:
    PHP:
    function disable_update_notifications()
    {
        global 
    $wp_version;
        return (object) array(
          
    'last_checked'=> time(),
          
    'version_checked'=> $wp_version
        
    );
    }
    add_filter('pre_site_transient_update_core','disable_update_notifications');
    add_filter('pre_site_transient_update_plugins','disable_update_notifications');
    add_filter('pre_site_transient_update_themes','disable_update_notifications');
    Và chèn vào wp-config.php code sau:
    PHP:
    define'WP_AUTO_UPDATE_CORE'false );
    Hoặc chèn vào function.php của themes (sử dụng tốt)
    PHP:
    define('DISALLOW_FILE_EDIT',true);
    add_filter'auto_update_theme''__return_false' );
    add_filter'auto_update_plugin''__return_false' );
    Nếu bạn muốn ẩn bớt thanh danh mục để thành viên không vào ấn update với các user thường thì dùng code sau:
    PHP:
    //an bot menu de khong update
    function itseovn_admin_menus() {
       
    remove_menu_page'index.php' ); // Menu Bang tin
       
    remove_menu_page'themes.php' ); // Menu Giao dien
       
    remove_menu_page'plugins.php' ); // Menu Plugins
    }
    add_action'admin_menu''itseovn_admin_menus' );
    Nếu muốn sử dụng plugin thì cài plugin sau: https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/
     
    Chỉnh sửa cuối: 3/8/21
    seolagi thích bài này.
  3. seolagi
    Tham gia ngày:
    16/4/14
    Bài viết:
    1,027
    Đã được thích:
    80
    Điểm thành tích:
    48
    Rất chi tiết, cảm ơn ad, mình thử ngay
     


Chủ để tương tự : Tắt tự
Diễn đàn Tiêu đề Date
Mã nguồn mở Wordpress Tắt đăng ký tạo thành viên mới trong Flatsome Wordpress 18/12/21
Mã nguồn mở Wordpress Xóa tất cả link, url liên kết trong bài viết post wordpress như thế nào? 25/8/21
Mã nguồn mở Wordpress Lấy content bài viết, sản phẩm và xóa tất cả mã html như thế nào? 29/1/21
Mã nguồn mở Wordpress Tắt thông báo Email khi User Comment trên wordpress cho admin 1/10/20
Mã nguồn mở Wordpress Disable/Enable (Tắt/Bật) Comment trên Themes Newspaper toàn tập 12/6/20