gglcptch_plugin_status

The Google Captcha (reCAPTCHA) by BestWebSoft gglcptch plugin status function.

Description

gglcptch_plugin_status( $plugins, $all_plugins, $is_network ); 

Parameters (3)

0. $plugins
The plugins.
1. $all_plugins
The all plugins.
2. $is_network
The is network.

Usage

  1. if ( !function_exists( 'gglcptch_plugin_status' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-captcha-recaptcha-by-bestwebsoft/google-captcha.php'; 
  3.  
  4. // The plugins. 
  5. $plugins = null; 
  6.  
  7. // The all plugins. 
  8. $all_plugins = null; 
  9.  
  10. // The is network. 
  11. $is_network = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = gglcptch_plugin_status($plugins, $all_plugins, $is_network); 
  15.  

Defined (1)

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

/google-captcha.php  
  1. function gglcptch_plugin_status( $plugins, $all_plugins, $is_network ) { 
  2. $result = array( 
  3. 'status' => '',  
  4. 'plugin' => '',  
  5. 'plugin_info' => array(),  
  6. ); 
  7. foreach ( (array)$plugins as $plugin ) { 
  8. if ( array_key_exists( $plugin, $all_plugins ) ) { 
  9. if ( 
  10. ( $is_network && is_plugin_active_for_network( $plugin ) ) || 
  11. ( ! $is_network && is_plugin_active( $plugin ) ) 
  12. ) { 
  13. $result['status'] = 'actived'; 
  14. $result['plugin'] = $plugin; 
  15. $result['plugin_info'] = $all_plugins[$plugin]; 
  16. break; 
  17. } else { 
  18. $result['status'] = 'deactivated'; 
  19. $result['plugin'] = $plugin; 
  20. $result['plugin_info'] = $all_plugins[$plugin]; 
  21.  
  22. if ( empty( $result['status'] ) ) 
  23. $result['status'] = 'not_installed'; 
  24. return $result;