Changeset 10564
- Timestamp:
- 01/11/2021 01:43:43 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r10507 r10564 1411 1411 if ( is_feed() ) { 1412 1412 if ( isset( $_GET['feed'] ) ) { 1413 wp_ redirect( esc_url_raw( remove_query_arg( 'feed' ) ), 301 );1413 wp_safe_redirect( esc_url_raw( remove_query_arg( 'feed' ) ), 301 ); 1414 1414 die(); 1415 1415 } 1416 1416 1417 set_query_var( 'feed', '' ); 1417 redirect_canonical(); 1418 1419 if ( ! redirect_canonical() ) { 1420 // There exists no canonical location for this request according to `redirect_canonical()`. 1421 if ( get_query_var( 's' ) ) { 1422 wp_safe_redirect( home_url( '/search/' . get_query_var('s') . '/' ), 301 ); 1423 } else { 1424 // If all else fails, homepage. 1425 wp_safe_redirect( home_url( '/' ) ); 1426 } 1427 } 1428 1418 1429 die(); 1419 1430 }
Note: See TracChangeset
for help on using the changeset viewer.