WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4/src/wp-includes/class-wp-customize-manager.php

    r35724 r36363  
    15361536    public function get_return_url() {
    15371537        $referer = wp_get_referer();
     1538        $excluded_referer_basenames = array( 'customize.php', 'wp-login.php' );
     1539
    15381540        if ( $this->return_url ) {
    15391541            $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 ) ) {
    15411543            $return_url = $referer;
    15421544        } else if ( $this->preview_url ) {
Note: See TracChangeset for help on using the changeset viewer.