Changeset 10267
- Timestamp:
- 09/16/2020 06:54:10 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
r10257 r10267 977 977 978 978 /** 979 * Adjust the login URL to point back to whatever part of the support forumswe're979 * Adjust the login URL to point back to whatever part of the plugin directory we're 980 980 * currently looking at. This allows the redirect to come back to the same place 981 981 * instead of the main /support URL by default. 982 982 */ 983 983 public function fix_login_url( $login_url, $redirect, $force_reauth ) { 984 // modify the redirect_to for the support forumsto point to the current page984 // modify the redirect_to for the plugin directory to point to the current page 985 985 if ( 0 === strpos( $_SERVER['REQUEST_URI'], '/plugins' ) ) { 986 986 // Note that this is not normal because of the code in /mu-plugins/wporg-sso/class-wporg-sso.php. … … 1004 1004 return $login_url; 1005 1005 } 1006 1007 1006 1008 1007 /** … … 1270 1269 */ 1271 1270 function custom_redirects() { 1271 global $wp_query; 1272 1272 1273 // Handle a redirect for /$plugin/$tab_name/ to /$plugin/#$tab_name. 1273 1274 if ( get_query_var( 'redirect_plugin' ) && get_query_var( 'redirect_plugin_tab' ) ) { … … 1334 1335 } 1335 1336 1337 // Redirect mixed-case plugin names to the canonical location. 1338 if ( 1339 get_query_var( 'name' ) && // A sanitized lowercase value is here 1340 is_singular() && 1341 ! empty( $wp_query->query['name'] ) && // The raw value is available here. 1342 get_query_var( 'name' ) != $wp_query->query['name'] 1343 ) { 1344 $url = get_permalink(); 1345 if ( get_query_var( 'plugin_advanced' ) ) { 1346 $url .= 'advanced/'; 1347 } 1348 1349 wp_safe_redirect( $url, 301 ); 1350 die(); 1351 } 1352 1336 1353 // If it's an old search query, handle that too. 1337 1354 if ( 'search.php' == get_query_var( 'name' ) && isset( $_GET['q'] ) ) { … … 1382 1399 } 1383 1400 1384 // disable feeds1401 // Disable feeds 1385 1402 if ( is_feed() ) { 1386 1403 if ( isset( $_GET['feed'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.