Last active
December 26, 2015 21:49
-
-
Save dovy/7218241 to your computer and use it in GitHub Desktop.
Use this to include ReduxFramework in your theme or plugin. It will ensure the ReduxFramework Plugin loads first. If not present your local copy will be used. This way there's no cross-over and if the user has the plugin they always get the newest version.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
This can be included in your functions.php file. It checks to make sure the plugin is not activated. Please note, | |
if you have the plugin in any other directory than redux-framework (ie, you installed via the Github Repo), this will not function. | |
*/ | |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Comment this line if within template files, IE required in files like functions.php | |
if ( !is_plugin_active('ReduxFramework/redux-framework.php') && !is_plugin_active('redux-framework/redux-framework.php') && !is_plugin_active('ReduxFramework-master/redux-framework.php') ) { | |
if ( !$active && !class_exists( 'Redux_Framework' ) && file_exists( dirname( __FILE__ ) . '/ReduxFramework/ReduxCore/framework.php' ) ) { | |
require_once( dirname( __FILE__ ) . '/ReduxFramework/ReduxCore/framework.php' ); | |
} | |
} | |
if ( file_exists( dirname( __FILE__ ) . '/ReduxFramework/sample/sample-config.php' ) ) { | |
require_once( dirname( __FILE__ ) . '/ReduxFramework/sample/sample-config.php' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment