wp_removable_query_args

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

Description

(array) wp_removable_query_args(); 

Returns (array)

An array of parameters to remove from the URL.


Usage

  1. if ( !function_exists( 'wp_removable_query_args' ) ) { 
  2. require_once ABSPATH . WPINC . '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_removable_query_args(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/functions.php  
  1. function wp_removable_query_args() { 
  2. $removable_query_args = array( 
  3. 'activate',  
  4. 'activated',  
  5. 'approved',  
  6. 'deactivate',  
  7. 'deleted',  
  8. 'disabled',  
  9. 'enabled',  
  10. error,  
  11. 'hotkeys_highlight_first',  
  12. 'hotkeys_highlight_last',  
  13. 'locked',  
  14. 'message',  
  15. 'same',  
  16. 'saved',  
  17. 'settings-updated',  
  18. 'skipped',  
  19. 'spammed',  
  20. 'trashed',  
  21. 'unspammed',  
  22. 'untrashed',  
  23. 'update',  
  24. 'updated',  
  25. 'wp-post-new-reload',  
  26. ); 
  27.  
  28. /** 
  29. * Filters the list of query variables to remove. 
  30. * @since 4.2.0 
  31. * @param array $removable_query_args An array of query variables to remove from a URL. 
  32. */ 
  33. return apply_filters( 'removable_query_args', $removable_query_args );