diff --git src/wp-admin/customize.php src/wp-admin/customize.php
index 6ee2de0..bfc9623 100644
|
|
$url = wp_unslash( $url ); |
21 | 21 | $url = wp_validate_redirect( $url, home_url( '/' ) ); |
22 | 22 | if ( $return ) { |
23 | 23 | $return = wp_unslash( $return ); |
| 24 | $return = remove_query_arg( wp_removable_query_args(), $return ); |
24 | 25 | $return = wp_validate_redirect( $return ); |
25 | 26 | } |
26 | 27 | if ( ! $return ) { |
diff --git src/wp-admin/includes/misc.php src/wp-admin/includes/misc.php
index 83e7548..d65d22b 100644
|
|
function post_form_autocomplete_off() { |
865 | 865 | * @since 4.2.0 |
866 | 866 | */ |
867 | 867 | function wp_admin_canonical_url() { |
868 | | $removable_query_args = array( |
869 | | 'message', 'settings-updated', 'saved', |
870 | | 'update', 'updated', 'activated', |
871 | | 'activate', 'deactivate', 'locked', |
872 | | 'deleted', 'trashed', 'untrashed', |
873 | | 'enabled', 'disabled', 'skipped', |
874 | | 'spammed', 'unspammed', |
875 | | 'error', |
876 | | ); |
877 | | |
878 | | /** |
879 | | * Filter the list of URL parameters to remove. |
880 | | * |
881 | | * @since 4.2.0 |
882 | | * |
883 | | * @param array $removable_query_args An array of parameters to remove from the URL. |
884 | | */ |
885 | | $removable_query_args = apply_filters( 'removable_query_args', $removable_query_args ); |
| 868 | $removable_query_args = wp_removable_query_args(); |
886 | 869 | |
887 | 870 | if ( empty( $removable_query_args ) ) { |
888 | 871 | return; |
diff --git src/wp-includes/functions.php src/wp-includes/functions.php
index 006cb6c..f18c86a 100644
|
|
function remove_query_arg( $key, $query = false ) { |
825 | 825 | } |
826 | 826 | |
827 | 827 | /** |
| 828 | * Returns the list of URL parameters to remove. |
| 829 | * |
| 830 | * @since 4.4.0 |
| 831 | * |
| 832 | * @return array An array of parameters to remove from the URL. |
| 833 | */ |
| 834 | function wp_removable_query_args() { |
| 835 | $removable_query_args = array( |
| 836 | 'message', 'settings-updated', 'saved', |
| 837 | 'update', 'updated', 'activated', |
| 838 | 'activate', 'deactivate', 'locked', |
| 839 | 'deleted', 'trashed', 'untrashed', |
| 840 | 'enabled', 'disabled', 'skipped', |
| 841 | 'spammed', 'unspammed', |
| 842 | ); |
| 843 | |
| 844 | /** |
| 845 | * Filter the list of URL parameters to remove. |
| 846 | * |
| 847 | * @since 4.2.0 |
| 848 | * |
| 849 | * @param array $removable_query_args An array of parameters to remove from the URL. |
| 850 | */ |
| 851 | return apply_filters( 'removable_query_args', $removable_query_args ); |
| 852 | } |
| 853 | |
| 854 | /** |
828 | 855 | * Walks the array while sanitizing the contents. |
829 | 856 | * |
830 | 857 | * @since 0.71 |