pmpro_admin_init_updates_redirect

Redirect away from updates page if there are no updates.

Description

pmpro_admin_init_updates_redirect(); 

Usage

  1. if ( !function_exists( 'pmpro_admin_init_updates_redirect' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/updates.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = pmpro_admin_init_updates_redirect(); 
  7.  

Defined (1)

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

/includes/updates.php  
  1. function pmpro_admin_init_updates_redirect() { 
  2. if(is_admin() && !empty($_REQUEST['page']) && $_REQUEST['page'] == 'pmpro-updates' && !pmpro_isUpdateRequired()) { 
  3. wp_redirect(admin_url('admin.php?page=pmpro-membershiplevels&updatescomplete=1')); 
  4. exit;