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. git-svn-id: https://develop.svn.wordpress.org/trunk@48149 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b09056e131
commit
a1dc0cfa3f
@ -60,9 +60,10 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
|
||||
$page = $this->get_pagenum();
|
||||
|
||||
$this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' ) &&
|
||||
current_user_can( 'update_plugins' ) &&
|
||||
( ! is_multisite() || $this->screen->in_admin( 'network' ) );
|
||||
$this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' )
|
||||
&& current_user_can( 'update_plugins' )
|
||||
&& ( ! is_multisite() || $this->screen->in_admin( 'network' ) )
|
||||
&& ! in_array( $status, array( 'mustuse', 'dropins' ), true );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user