WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/02/2015 11:28:11 AM (6 years ago)
Author:
johnbillion
Message:

Introduce wp_removable_query_args(), which returns an array of single-use query variables which can be removed from a URL.

Also applies the function to the return URL when the Customizer is closed.

Fixes #32692
Props swissspidy, Mte90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r33770 r33849  
    866866 */
    867867function 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();
    886869
    887870    if ( empty( $removable_query_args ) ) {
Note: See TracChangeset for help on using the changeset viewer.