pods_deactivate_pods_1_x

Deactivate Pods 1.x or other Pods plugins.

Description

pods_deactivate_pods_1_x(); 

Usage

  1. if ( !function_exists( 'pods_deactivate_pods_1_x' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'pods-custom-content-types-and-fields/init.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = pods_deactivate_pods_1_x(); 
  7.  

Defined (1)

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

/init.php  
  1. function pods_deactivate_pods_1_x () { 
  2. if ( defined( 'PODS_VERSION' ) && defined( 'PODS_DIR' ) && file_exists( untrailingslashit( PODS_DIR ) . '/init.php' ) ) { 
  3. if ( !function_exists( 'deactivate_plugins' ) ) 
  4. include_once ABSPATH . 'wp-admin/includes/plugin.php'; 
  5.  
  6. deactivate_plugins( realpath( untrailingslashit( PODS_DIR ) . '/init.php' ) ); 
  7.  
  8. if ( !headers_sent() && ( !function_exists( 'pods_ui_manage' ) && !file_exists( WP_CONTENT_DIR . 'plugins/pods-ui/pods-ui.php' ) ) ) { 
  9. wp_redirect( $_SERVER[ 'REQUEST_URI' ] ); 
  10. die();