Changeset 5821
- Timestamp:
- 08/17/2017 10:18:40 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r5815 r5821 461 461 */ 462 462 function get_site_section_url() { 463 $parts = explode( '/', $ _SERVER['REQUEST_URI']);464 switch ( $parts[ 1] ) {463 $parts = explode( '/', $GLOBALS['wp']->request ); 464 switch ( $parts[0] ) { 465 465 case 'reference': 466 466 case 'plugins': 467 467 case 'themes': 468 468 return home_url( '/' . $parts[1] . '/' ); 469 case 'cli': 470 return home_url( '/cli/commands/' ); 469 471 default: 470 472 return home_url( '/' );
Note: See TracChangeset
for help on using the changeset viewer.