Plugins: Avoid a PHP notice if the update-supported
key in plugin data is not set.
Props sanzeeb3. Fixes #51052. git-svn-id: https://develop.svn.wordpress.org/trunk@48820 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5cec68d0c9
commit
c65973e0f5
@ -1094,14 +1094,14 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
if ( isset( $plugin_data['auto-update-forced'] ) ) {
|
if ( isset( $plugin_data['auto-update-forced'] ) ) {
|
||||||
if ( $plugin_data['auto-update-forced'] ) {
|
if ( $plugin_data['auto-update-forced'] ) {
|
||||||
// Forced on
|
// Forced on.
|
||||||
$text = __( 'Auto-updates enabled' );
|
$text = __( 'Auto-updates enabled' );
|
||||||
} else {
|
} else {
|
||||||
$text = __( 'Auto-updates disabled' );
|
$text = __( 'Auto-updates disabled' );
|
||||||
}
|
}
|
||||||
$action = 'unavailable';
|
$action = 'unavailable';
|
||||||
$time_class = ' hidden';
|
$time_class = ' hidden';
|
||||||
} elseif ( ! $plugin_data['update-supported'] ) {
|
} elseif ( empty( $plugin_data['update-supported'] ) ) {
|
||||||
$text = '';
|
$text = '';
|
||||||
$action = 'unavailable';
|
$action = 'unavailable';
|
||||||
$time_class = ' hidden';
|
$time_class = ' hidden';
|
||||||
|
Loading…
Reference in New Issue
Block a user