Title: wp_removable_query_args
Published: December 9, 2015
Last modified: February 24, 2026

---

# wp_removable_query_args(): string[]

## In this article

 * [Return](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#wp--skip-link--target)

Returns an array of single-use query variable names that can be removed from a URL.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#return)󠁿

 string[] An array of query variable names to remove from the URL.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#source)󠁿

    ```php
    function wp_removable_query_args() {
    	$removable_query_args = array(
    		'activate',
    		'activated',
    		'admin_email_remind_later',
    		'approved',
    		'core-major-auto-updates-saved',
    		'deactivate',
    		'delete_count',
    		'deleted',
    		'disabled',
    		'doing_wp_cron',
    		'enabled',
    		'error',
    		'hotkeys_highlight_first',
    		'hotkeys_highlight_last',
    		'ids',
    		'locked',
    		'message',
    		'same',
    		'saved',
    		'settings-updated',
    		'skipped',
    		'spammed',
    		'trashed',
    		'unspammed',
    		'untrashed',
    		'update',
    		'updated',
    		'wp-post-new-reload',
    	);

    	/**
    	 * Filters the list of query variable names to remove.
    	 *
    	 * @since 4.2.0
    	 *
    	 * @param string[] $removable_query_args An array of query variable names to remove from a URL.
    	 */
    	return apply_filters( 'removable_query_args', $removable_query_args );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/functions.php#L1237)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/functions.php#L1237-L1277)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#hooks)󠁿

 [apply_filters( ‘removable_query_args’, string[] $removable_query_args )](https://developer.wordpress.org/reference/hooks/removable_query_args/)

Filters the list of query variable names to remove.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#related)󠁿

| Uses | Description | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

| Used by | Description | 
| [WP_Customize_Manager::set_return_url()](https://developer.wordpress.org/reference/classes/wp_customize_manager/set_return_url/)`wp-includes/class-wp-customize-manager.php` |

Sets URL to link the user to when closing the Customizer.

  | 
| [wp_admin_canonical_url()](https://developer.wordpress.org/reference/functions/wp_admin_canonical_url/)`wp-admin/includes/misc.php` |

Removes single-use URL parameters and create canonical link based on new URL.

  | 
| [wp_prepare_themes_for_js()](https://developer.wordpress.org/reference/functions/wp_prepare_themes_for_js/)`wp-admin/includes/theme.php` |

Prepares themes for JavaScript.

  | 
| [WP_List_Table::pagination()](https://developer.wordpress.org/reference/classes/wp_list_table/pagination/)`wp-admin/includes/class-wp-list-table.php` |

Displays the pagination.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_removable_query_args/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.4.0](https://developer.wordpress.org/reference/since/4.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_removable_query_args%2F)
before being able to contribute a note or feedback.