Security: Don't display the plugin auto-update options for mu-plugins or dropins.

They can't be updated, so we shouldn't be showing the buttons.

Fixes #50459.

Props Chouby, audrasjb, pbiron.


Built from https://develop.svn.wordpress.org/trunk@48149


git-svn-id: http://core.svn.wordpress.org/trunk@47918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2020-06-23 22:58:09 +00:00
parent ce784f7ad4
commit 517f6501df
2 changed files with 5 additions and 4 deletions

View File

@ -60,9 +60,10 @@ class WP_Plugins_List_Table extends WP_List_Table {
$page = $this->get_pagenum(); $page = $this->get_pagenum();
$this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' ) && $this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' )
current_user_can( 'update_plugins' ) && && current_user_can( 'update_plugins' )
( ! is_multisite() || $this->screen->in_admin( 'network' ) ); && ( ! is_multisite() || $this->screen->in_admin( 'network' ) )
&& ! in_array( $status, array( 'mustuse', 'dropins' ), true );
} }
/** /**

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.5-alpha-48148'; $wp_version = '5.5-alpha-48149';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.