Skip to content

Commit

Permalink
Adds check on plugin activation to make sure Woothemes Sensei is alre…
Browse files Browse the repository at this point in the history
…ady active
  • Loading branch information
christophherr committed Mar 4, 2016
1 parent 095113f commit bde3f32
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions genesis-connect-for-woothemes-sensei.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* Description: Plugin wrapper to easily integrate the Woothemes Sensei plugin with the Genesis Framework. This plugin will only work with the Genesis Framework and its child themes.
* Author: Christoph Herr
* Author URI: http://www.christophherr.com
* Version: 1.0.3
* Version: 1.1.0
* Text Domain: genesis-connect-for-woothemes-sensei
* Domain Path: /languages
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*
* @package GenesisConnectforWoothemesSensei
* @author Christoph Herr
* @version 1.0.3
* @version 1.1.0
* @license GPL-2.0+
*
* Genesis Connect for Woothemes Sensei is free software: you can redistribute it and/or modify
Expand All @@ -37,7 +37,7 @@

/**
* This function runs on plugin activation. It checks to make sure the
* Genesis Framework is active. If not, it deactivates the plugin.
* Genesis Framework and Woothemes Sensei are active. If not, it deactivates the plugin.
*
* @since 1.0
*/
Expand All @@ -47,6 +47,11 @@ function gcfws_activation() {
deactivate_plugins( plugin_basename( __FILE__ ) );
add_action( 'admin_notices', 'gcfws_admin_notice_message' );
}
if ( ! class_exists( ('Sensei_Main' ) || ( 'WooThemes_Sensei' ) ) ) {
// Deactivate.
deactivate_plugins( plugin_basename( __FILE__ ) );
add_action( 'admin_notices', 'gcfws_admin_notice_message_sensei' );
}
}

register_activation_hook( __FILE__, 'gcfws_activation' );
Expand Down

0 comments on commit bde3f32

Please sign in to comment.