Changeset 60929
- Timestamp:
- 10/13/2025 11:10:18 PM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/plugins.php (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/plugins.php
r60924 r60929 19 19 $action = $wp_list_table->current_action(); 20 20 21 $plugin = isset( $_REQUEST['plugin'] ) ? wp_unslash( $_REQUEST['plugin'] ) : '';22 $s earch_term= isset( $_REQUEST['s'] ) ? urlencode( wp_unslash( $_REQUEST['s'] ) ) : '';21 $plugin = isset( $_REQUEST['plugin'] ) ? wp_unslash( $_REQUEST['plugin'] ) : ''; 22 $s = isset( $_REQUEST['s'] ) ? urlencode( wp_unslash( $_REQUEST['s'] ) ) : ''; 23 23 24 24 // Clean up request URI from temporary args for screen options/paging uri's to work as expected. … … 52 52 53 53 if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) { 54 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s earch_term" ) );54 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) ); 55 55 exit; 56 56 } … … 61 61 if ( is_wp_error( $result ) ) { 62 62 if ( 'unexpected_output' === $result->get_error_code() ) { 63 $redirect = self_admin_url( 'plugins.php?error=true&charsout=' . strlen( $result->get_error_data() ) . '&plugin=' . urlencode( $plugin ) . "&plugin_status=$status&paged=$page&s=$s earch_term" );63 $redirect = self_admin_url( 'plugins.php?error=true&charsout=' . strlen( $result->get_error_data() ) . '&plugin=' . urlencode( $plugin ) . "&plugin_status=$status&paged=$page&s=$s" ); 64 64 wp_redirect( add_query_arg( '_error_nonce', wp_create_nonce( 'plugin-activation-error_' . $plugin ), $redirect ) ); 65 65 exit; … … 86 86 } else { 87 87 // Overrides the ?error=true one above. 88 wp_redirect( self_admin_url( "plugins.php?activate=true&plugin_status=$status&paged=$page&s=$s earch_term" ) );88 wp_redirect( self_admin_url( "plugins.php?activate=true&plugin_status=$status&paged=$page&s=$s" ) ); 89 89 } 90 90 exit; … … 120 120 121 121 if ( empty( $plugins ) ) { 122 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s earch_term" ) );122 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) ); 123 123 exit; 124 124 } … … 142 142 } 143 143 144 wp_redirect( self_admin_url( "plugins.php?activate-multi=true&plugin_status=$status&paged=$page&s=$s earch_term" ) );144 wp_redirect( self_admin_url( "plugins.php?activate-multi=true&plugin_status=$status&paged=$page&s=$s" ) ); 145 145 exit; 146 146 … … 205 205 206 206 if ( ! is_network_admin() && is_plugin_active_for_network( $plugin ) ) { 207 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s earch_term" ) );207 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) ); 208 208 exit; 209 209 } … … 218 218 219 219 if ( headers_sent() ) { 220 echo "<meta http-equiv='refresh' content='" . esc_attr( "0;url=plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s earch_term" ) . "' />";221 } else { 222 wp_redirect( self_admin_url( "plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s earch_term" ) );220 echo "<meta http-equiv='refresh' content='" . esc_attr( "0;url=plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s" ) . "' />"; 221 } else { 222 wp_redirect( self_admin_url( "plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s" ) ); 223 223 } 224 224 exit; … … 247 247 } 248 248 if ( empty( $plugins ) ) { 249 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s earch_term" ) );249 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) ); 250 250 exit; 251 251 } … … 264 264 } 265 265 266 wp_redirect( self_admin_url( "plugins.php?deactivate-multi=true&plugin_status=$status&paged=$page&s=$s earch_term" ) );266 wp_redirect( self_admin_url( "plugins.php?deactivate-multi=true&plugin_status=$status&paged=$page&s=$s" ) ); 267 267 exit; 268 268 … … 277 277 $plugins = isset( $_REQUEST['checked'] ) ? (array) wp_unslash( $_REQUEST['checked'] ) : array(); 278 278 if ( empty( $plugins ) ) { 279 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s earch_term" ) );279 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) ); 280 280 exit; 281 281 } … … 283 283 $plugins = array_filter( $plugins, 'is_plugin_inactive' ); // Do not allow to delete activated plugins. 284 284 if ( empty( $plugins ) ) { 285 wp_redirect( self_admin_url( "plugins.php?error=true&main=true&plugin_status=$status&paged=$page&s=$s earch_term" ) );285 wp_redirect( self_admin_url( "plugins.php?error=true&main=true&plugin_status=$status&paged=$page&s=$s" ) ); 286 286 exit; 287 287 } … … 291 291 $invalid_plugin_files = array_filter( $plugins, 'validate_file' ); 292 292 if ( $invalid_plugin_files ) { 293 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s earch_term" ) );293 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) ); 294 294 exit; 295 295 } … … 433 433 // Cannot use transient/cache, as that could get flushed if any plugin flushes data on uninstall/delete. 434 434 update_option( 'plugins_delete_result_' . $user_ID, $delete_result, false ); 435 wp_redirect( self_admin_url( "plugins.php?deleted=$plugins_to_delete&plugin_status=$status&paged=$page&s=$s earch_term" ) );435 wp_redirect( self_admin_url( "plugins.php?deleted=$plugins_to_delete&plugin_status=$status&paged=$page&s=$s" ) ); 436 436 exit; 437 437 case 'clear-recent-list': … … 454 454 check_admin_referer( 'resume-plugin_' . $plugin ); 455 455 456 $result = resume_plugin( $plugin, self_admin_url( "plugins.php?error=resuming&plugin_status=$status&paged=$page&s=$s earch_term" ) );456 $result = resume_plugin( $plugin, self_admin_url( "plugins.php?error=resuming&plugin_status=$status&paged=$page&s=$s" ) ); 457 457 458 458 if ( is_wp_error( $result ) ) { … … 460 460 } 461 461 462 wp_redirect( self_admin_url( "plugins.php?resume=true&plugin_status=$status&paged=$page&s=$s earch_term" ) );462 wp_redirect( self_admin_url( "plugins.php?resume=true&plugin_status=$status&paged=$page&s=$s" ) ); 463 463 exit; 464 464 case 'enable-auto-update': … … 474 474 } 475 475 476 $redirect = self_admin_url( "plugins.php?plugin_status={$status}&paged={$page}&s={$s earch_term}" );476 $redirect = self_admin_url( "plugins.php?plugin_status={$status}&paged={$page}&s={$s}" ); 477 477 478 478 if ( 'enable-auto-update' === $action || 'disable-auto-update' === $action ) { … … 772 772 } 773 773 774 if ( strlen( $s earch_term) ) {774 if ( strlen( $s ) ) { 775 775 echo '<span class="subtitle">'; 776 776 printf( 777 777 /* translators: %s: Search query. */ 778 778 __( 'Search results for: %s' ), 779 '<strong>' . esc_html( urldecode( $s earch_term) ) . '</strong>'779 '<strong>' . esc_html( urldecode( $s ) ) . '</strong>' 780 780 ); 781 781 echo '</span>';
Note: See TracChangeset
for help on using the changeset viewer.