Changeset 46754 for trunk/src/wp-includes/class-wp-customize-manager.php
- Timestamp:
- 11/20/2019 06:47:08 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r46691 r46754 4623 4623 * @since 4.4.0 4624 4624 * 4625 * @global array $_registered_pages 4626 * 4625 4627 * @return string URL for link to close Customizer. 4626 4628 */ 4627 4629 public function get_return_url() { 4630 global $_registered_pages; 4631 4628 4632 $referer = wp_get_referer(); 4629 4633 $excluded_referer_basenames = array( 'customize.php', 'wp-login.php' ); … … 4638 4642 $return_url = home_url( '/' ); 4639 4643 } 4644 4645 $return_url_basename = wp_basename( parse_url( $this->return_url, PHP_URL_PATH ) ); 4646 $return_url_query = parse_url( $this->return_url, PHP_URL_QUERY ); 4647 4648 if ( 'themes.php' === $return_url_basename && $return_url_query ) { 4649 parse_str( $return_url_query, $query_vars ); 4650 4651 /* 4652 * If the return URL is a page added by a theme to the Appearance menu via add_submenu_page(), 4653 * verify that belongs to the active theme, otherwise fall back to the Themes screen. 4654 */ 4655 if ( isset( $query_vars['page'] ) && ! isset( $_registered_pages[ "appearance_page_{$query_vars['page']}" ] ) ) { 4656 $return_url = admin_url( 'themes.php' ); 4657 } 4658 } 4659 4640 4660 return $return_url; 4641 4661 }
Note: See TracChangeset
for help on using the changeset viewer.