Changeset 36363
- Timestamp:
- 01/20/2016 08:36:17 AM (9 years ago)
- Location:
- branches/4.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
-
branches/4.4/src/wp-includes/class-wp-customize-manager.php
r35724 r36363 1536 1536 public function get_return_url() { 1537 1537 $referer = wp_get_referer(); 1538 $excluded_referer_basenames = array( 'customize.php', 'wp-login.php' ); 1539 1538 1540 if ( $this->return_url ) { 1539 1541 $return_url = $this->return_url; 1540 } else if ( $referer && 'customize.php' !== basename( parse_url( $referer, PHP_URL_PATH )) ) {1542 } else if ( $referer && ! in_array( basename( parse_url( $referer, PHP_URL_PATH ) ), $excluded_referer_basenames, true ) ) { 1541 1543 $return_url = $referer; 1542 1544 } else if ( $this->preview_url ) { -
branches/4.4/tests/phpunit/tests/customize/manager.php
r35724 r36363 322 322 323 323 $_SERVER['HTTP_REFERER'] = wp_slash( admin_url( 'customize.php' ) ); 324 $this->assertEquals( $preview_url, $this->manager->get_return_url() ); 325 326 // See #35355. 327 $_SERVER['HTTP_REFERER'] = wp_slash( admin_url( 'wp-login.php' ) ); 324 328 $this->assertEquals( $preview_url, $this->manager->get_return_url() ); 325 329
Note: See TracChangeset
for help on using the changeset viewer.