Make WordPress Core

Ticket #50459: 50459.diff

File 50459.diff, 1.2 KB (added by pbiron, 6 years ago)
  • src/wp-admin/includes/class-wp-plugins-list-table.php

    From 84d398cc3d40b7f87538ad8b042adda428a188ae Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Tue, 23 Jun 2020 11:43:50 -0600
    Subject: [PATCH] Ensure that the enable/disable auto-update links don't appear
     for must-use and drop-in plugins.
    
    ---
     src/wp-admin/includes/class-wp-plugins-list-table.php | 7 ++++---
     1 file changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php
    index b2b74d65db..f59ece0bc1 100644
    a b class WP_Plugins_List_Table extends WP_List_Table { 
    6060
    6161                $page = $this->get_pagenum();
    6262
    63                 $this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' ) &&
    64                         current_user_can( 'update_plugins' ) &&
    65                         ( ! is_multisite() || $this->screen->in_admin( 'network' ) );
     63                $this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' )
     64                        && current_user_can( 'update_plugins' )
     65                        && ( ! is_multisite() || $this->screen->in_admin( 'network' ) )
     66                        && ! in_array( $status, array( 'mustuse', 'dropins' ), true );
    6667        }
    6768
    6869        /**