Skip to content

Commit 544b839

Browse files
committed
fix: phpcs and remove debug code
1 parent eed75b2 commit 544b839

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

src/wp-admin/includes/class-wp-plugins-list-table.php

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -150,30 +150,12 @@ public function prepare_items() {
150150
$plugins['dropins'] = get_dropins();
151151
}
152152

153-
/**
154-
* REPLACE WITH (or ADD AFTER the above code):
155-
*/
156153
if ( current_user_can( 'update_plugins' ) ) {
157154
$current = get_site_transient( 'update_plugins' );
158-
// echo '<pre>';
159-
// echo print_r( $current->response, true );
160-
// echo '</pre>';
161155
foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
162-
// Check if plugin has an available update.
163156
if ( isset( $current->response[ $plugin_file ] ) ) {
164-
165157
$plugins['all'][ $plugin_file ]['update'] = true;
166158
$plugins['upgrade'][ $plugin_file ] = $plugins['all'][ $plugin_file ];
167-
168-
// Merge additional API data from update response.
169-
// This includes: slug, tested, requires, requires_php, etc.
170-
$api_data = (array) $current->response[ $plugin_file ];
171-
$plugins['all'][ $plugin_file ] = array_merge( $plugins['all'][ $plugin_file ], $api_data );
172-
173-
} elseif ( isset( $current->no_update[ $plugin_file ] ) ) {
174-
// Plugin is up-to-date, but we still want API data (tested, requires, etc.)
175-
$api_data = (array) $current->no_update[ $plugin_file ];
176-
$plugins['all'][ $plugin_file ] = array_merge( $plugins['all'][ $plugin_file ], $api_data );
177159
}
178160
}
179161
}
@@ -472,8 +454,7 @@ public function search_box( $text, $input_id ) {
472454
?>
473455
<p class="search-box">
474456
<label for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?></label>
475-
<input type="search" id="<?php echo esc_attr( $input_id ); ?>" class="wp-filter-search" name="s"
476-
value="<?php _admin_search_query(); ?>" />
457+
<input type="search" id="<?php echo esc_attr( $input_id ); ?>" class="wp-filter-search" name="s" value="<?php _admin_search_query(); ?>" />
477458
<?php submit_button( $text, 'hide-if-js', '', false, array( 'id' => 'search-submit' ) ); ?>
478459
</p>
479460
<?php
@@ -811,7 +792,7 @@ public function single_row( $item ) {
811792
'commercial_support_url' => false,
812793
'donate_link' => false,
813794
'preview_link' => false,
814-
)
795+
),
815796
)
816797
);
817798

@@ -1585,7 +1566,7 @@ public function single_row( $item ) {
15851566
/* translators: 1: Current WordPress version, 2: Version the plugin was tested up to. */
15861567
__( 'This plugin has not been tested with your current version of WordPress (%1$s). It may still work, but consider checking for an update or contacting the plugin author. Last tested with WordPress %2$s.' ),
15871568
$wp_version,
1588-
$tested_wp,
1569+
$tested_wp
15891570
);
15901571

15911572
/**

0 commit comments

Comments
 (0)