diff --git src/wp-admin/includes/theme.php src/wp-admin/includes/theme.php
index 822fb5b656..c5de5e5c9c 100644
|
|
function wp_prepare_themes_for_js( $themes = null ) { |
578 | 578 | if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { |
579 | 579 | $customize_action = esc_url( add_query_arg( |
580 | 580 | array( |
581 | | 'return' => urlencode( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), |
| 581 | 'return' => urlencode( esc_url_raw( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ), |
582 | 582 | ), |
583 | 583 | wp_customize_url( $slug ) |
584 | 584 | ) ); |
diff --git src/wp-admin/menu.php src/wp-admin/menu.php
index f258e5639b..42a26ddfcb 100644
|
|
$appearance_cap = current_user_can( 'switch_themes') ? 'switch_themes' : 'edit_t |
157 | 157 | $menu[60] = array( __( 'Appearance' ), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' ); |
158 | 158 | $submenu['themes.php'][5] = array( __( 'Themes' ), $appearance_cap, 'themes.php' ); |
159 | 159 | |
160 | | $customize_url = add_query_arg( 'return', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'customize.php' ); |
| 160 | $customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' ); |
161 | 161 | $submenu['themes.php'][6] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' ); |
162 | 162 | |
163 | 163 | if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) { |
diff --git src/wp-admin/nav-menus.php src/wp-admin/nav-menus.php
index 974d910d20..d8fc77f01d 100644
|
|
require_once( ABSPATH . 'wp-admin/admin-header.php' ); |
584 | 584 | ' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>', |
585 | 585 | esc_url( add_query_arg( array( |
586 | 586 | 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'] ) ) ), |
588 | 588 | ), admin_url( 'customize.php' ) ) ), |
589 | 589 | __( 'Manage with Live Preview' ) |
590 | 590 | ); |
diff --git src/wp-admin/widgets.php src/wp-admin/widgets.php
index 8793cab2d5..db4459b387 100644
|
|
if ( current_user_can( 'customize' ) ) { |
357 | 357 | esc_url( add_query_arg( |
358 | 358 | array( |
359 | 359 | array( 'autofocus' => array( 'panel' => 'widgets' ) ), |
360 | | 'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) |
| 360 | 'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) |
361 | 361 | ), |
362 | 362 | admin_url( 'customize.php' ) |
363 | 363 | ) ), |