- Timestamp:
- 04/05/2020 03:00:44 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r47167 r47550 40 40 ); 41 41 42 $status_whitelist = array( 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', 'search', 'paused' ); 43 42 44 $status = 'all'; 43 if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', 'search', 'paused' )) ) {45 if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], $status_whitelist, true ) ) { 44 46 $status = $_REQUEST['plugin_status']; 45 47 } … … 244 246 } 245 247 246 if ( empty( $plugins[ $status ] ) && ! in_array( $status, array( 'all', 'search' ) ) ) {248 if ( empty( $plugins[ $status ] ) && ! in_array( $status, array( 'all', 'search' ), true ) ) { 247 249 $status = 'all'; 248 250 } … … 399 401 400 402 return array( 401 'cb' => ! in_array( $status, array( 'mustuse', 'dropins' ) ) ? '<input type="checkbox" />' : '',403 'cb' => ! in_array( $status, array( 'mustuse', 'dropins' ), true ) ? '<input type="checkbox" />' : '', 402 404 'name' => __( 'Plugin' ), 403 405 'description' => __( 'Description' ), … … 543 545 global $status; 544 546 545 if ( in_array( $status, array( 'mustuse', 'dropins' ) ) ) {547 if ( in_array( $status, array( 'mustuse', 'dropins' ), true ) ) { 546 548 return; 547 549 } … … 557 559 global $status; 558 560 559 if ( ! in_array( $status, array( 'recently_activated', 'mustuse', 'dropins' ) ) ) {561 if ( ! in_array( $status, array( 'recently_activated', 'mustuse', 'dropins' ), true ) ) { 560 562 return; 561 563 } … … 598 600 global $status; 599 601 600 if ( is_multisite() && ! $this->screen->in_admin( 'network' ) && in_array( $status, array( 'mustuse', 'dropins' ) ) ) {602 if ( is_multisite() && ! $this->screen->in_admin( 'network' ) && in_array( $status, array( 'mustuse', 'dropins' ), true ) ) { 601 603 return; 602 604 } … … 832 834 $class = $is_active ? 'active' : 'inactive'; 833 835 $checkbox_id = 'checkbox_' . md5( $plugin_data['Name'] ); 834 if ( $restrict_network_active || $restrict_network_only || in_array( $status, array( 'mustuse', 'dropins' ) ) || ! $compatible_php ) {836 if ( $restrict_network_active || $restrict_network_only || in_array( $status, array( 'mustuse', 'dropins' ), true ) || ! $compatible_php ) { 835 837 $checkbox = ''; 836 838 } else { … … 871 873 foreach ( $columns as $column_name => $column_display_name ) { 872 874 $extra_classes = ''; 873 if ( in_array( $column_name, $hidden ) ) {875 if ( in_array( $column_name, $hidden, true ) ) { 874 876 $extra_classes = ' hidden'; 875 877 }
Note: See TracChangeset
for help on using the changeset viewer.