Function Reference: geodir_recaptcha_plugin_activated

Summary

check GeoDirectory plugin installed.

Package

GeoDirectory_ReCaptcha

Parameters

$plugin
(string) (required) Path to a plugin file or directory, relative to the plugins directory (without the leading and trailing slashes).

Default: None

Change Log

Since: 1.0.0

Source File

geodir_recaptcha_plugin_activated() is located in geodir_recaptcha/includes/gdcaptcha_functions.php [Line: 81]

Source Code

function geodir_recaptcha_plugin_activated( $plugin ) {
	if ( !get_option( 'geodir_installed' ) )  {
		$file = plugin_basename( __FILE__ );
		
		if ( $file == $plugin ) {
			$all_active_plugins = get_option( 'active_plugins', array() );
			
			if ( !empty( $all_active_plugins ) && is_array( $all_active_plugins ) ) {
				foreach ( $all_active_plugins as $key => $plugin ) {
					if ( $plugin == $file ) {
						unset( $all_active_plugins[$key] );
					}
				}
			}
			update_option( 'active_plugins', $all_active_plugins );
		}
		
		wp_die( __( 'There was an issue determining where GeoDirectory Plugin is installed and activated. Please install or activate GeoDirectory Plugin.', GDCAPTCHA_TEXTDOMAIN ) );
	}
}