Make WordPress Core

Ticket #31850: 31850.diff

File 31850.diff, 2.1 KB (added by dlh, 9 years ago)
  • src/wp-admin/menu.php

     
    156156$menu[60] = array( __( 'Appearance' ), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
    157157        $submenu['themes.php'][5] = array( __( 'Themes' ), $appearance_cap, 'themes.php' );
    158158
    159         $customize_url = add_query_arg( 'return', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'customize.php' );
     159        $customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' );
    160160        $submenu['themes.php'][6] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' );
    161161
    162162        if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
  • src/wp-admin/nav-menus.php

     
    584584                                ' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
    585585                                esc_url( add_query_arg( array(
    586586                                        array( 'autofocus' => $focus ),
    587                                         'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
     587                                        'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ),
    588588                                ), admin_url( 'customize.php' ) ) ),
    589589                                __( 'Manage with Live Preview' )
    590590                        );
  • src/wp-admin/widgets.php

     
    353353                        esc_url( add_query_arg(
    354354                                array(
    355355                                        array( 'autofocus' => array( 'panel' => 'widgets' ) ),
    356                                         'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) )
     356                                        'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) )
    357357                                ),
    358358                                admin_url( 'customize.php' )
    359359                        ) ),