Changeset 54135
- Timestamp:
- 09/12/2022 09:48:59 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r54133 r54135 4687 4687 if ( $this->return_url ) { 4688 4688 $return_url = $this->return_url; 4689 4690 $return_url_basename = wp_basename( parse_url( $this->return_url, PHP_URL_PATH ) ); 4691 $return_url_query = parse_url( $this->return_url, PHP_URL_QUERY ); 4692 4693 if ( 'themes.php' === $return_url_basename && $return_url_query ) { 4694 parse_str( $return_url_query, $query_vars ); 4695 4696 /* 4697 * If the return URL is a page added by a theme to the Appearance menu via add_submenu_page(), 4698 * verify that it belongs to the active theme, otherwise fall back to the Themes screen. 4699 */ 4700 if ( isset( $query_vars['page'] ) && ! isset( $_registered_pages[ "appearance_page_{$query_vars['page']}" ] ) ) { 4701 $return_url = admin_url( 'themes.php' ); 4702 } 4703 } 4689 4704 } elseif ( $referer && ! in_array( wp_basename( parse_url( $referer, PHP_URL_PATH ) ), $excluded_referer_basenames, true ) ) { 4690 4705 $return_url = $referer; … … 4693 4708 } else { 4694 4709 $return_url = home_url( '/' ); 4695 }4696 4697 $return_url_basename = wp_basename( parse_url( $this->return_url, PHP_URL_PATH ) );4698 $return_url_query = parse_url( $this->return_url, PHP_URL_QUERY );4699 4700 if ( 'themes.php' === $return_url_basename && $return_url_query ) {4701 parse_str( $return_url_query, $query_vars );4702 4703 /*4704 * If the return URL is a page added by a theme to the Appearance menu via add_submenu_page(),4705 * verify that it belongs to the active theme, otherwise fall back to the Themes screen.4706 */4707 if ( isset( $query_vars['page'] ) && ! isset( $_registered_pages[ "appearance_page_{$query_vars['page']}" ] ) ) {4708 $return_url = admin_url( 'themes.php' );4709 }4710 4710 } 4711 4711
Note: See TracChangeset
for help on using the changeset viewer.