M_remove_old_plugin

The Membership 2 M remove old plugin function.

Description

M_remove_old_plugin( $plugins ); 

Parameters (1)

0. $plugins
The plugins.

Usage

  1. if ( !function_exists( 'M_remove_old_plugin' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/includes/functions.php'; 
  3.  
  4. // The plugins. 
  5. $plugins = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = M_remove_old_plugin($plugins); 
  9.  

Defined (1)

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

/app_old/membershipincludes/includes/functions.php  
  1. function M_remove_old_plugin( $plugins ) { 
  2.  
  3. if(array_key_exists('membership/membership.php', $plugins) && !in_array('membership.php', (array) array_map('basename', wp_get_active_and_valid_plugins() ))) { 
  4. unset($plugins['membership/membership.php']); 
  5.  
  6. return $plugins;