um_admin_do_action__purge_temp

The Ultimate Member um admin do action purge temp function.

Description

um_admin_do_action__purge_temp( $action ); 

Parameters (1)

0. $action
The action.

Usage

  1. if ( !function_exists( 'um_admin_do_action__purge_temp' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ultimate-member/admin/core/um-admin-actions.php'; 
  3.  
  4. // The action. 
  5. $action = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = um_admin_do_action__purge_temp($action); 
  9.  

Defined (1)

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

/admin/core/um-admin-actions.php  
  1. function um_admin_do_action__purge_temp( $action ) { 
  2. global $ultimatemember; 
  3. if ( !is_admin() || !current_user_can('manage_options') ) die(); 
  4.  
  5. $ultimatemember->files->remove_dir( $ultimatemember->files->upload_temp ); 
  6.  
  7. $url = remove_query_arg('um_adm_action', $ultimatemember->permalinks->get_current_url() ); 
  8. $url = add_query_arg('update', 'purged_temp', $url); 
  9. exit( wp_redirect($url) );