| 1 |
<?php |
| 2 |
/** |
| 3 |
* Extra features, shortcodes and widgets for themes with auxin framework (i.e Phlox Theme) |
| 4 |
* |
| 5 |
* |
| 6 |
* @package Auxin |
| 7 |
* @license LICENSE.txt |
| 8 |
* @author |
| 9 |
* @link http://averta.net/phlox/ |
| 10 |
* @copyright (c) 2010-2017 |
| 11 |
* |
| 12 |
* Plugin Name: Phlox Core Elements |
| 13 |
* Plugin URI: https://wordpress.org/plugins/auxin-elements/ |
| 14 |
* Description: Powerful and comprehensive plugin that extends the functionality of Phlox theme by adding new shortcodes, widgets and options |
| 15 |
* Version: 1.4.0 |
| 16 |
* Author: averta |
| 17 |
* Author URI: http://averta.net |
| 18 |
* Text Domain: auxin-elements |
| 19 |
* License: GPL2 |
| 20 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 21 |
* Domain Path: /languages |
| 22 |
* Tested up to: 4.8.1 |
| 23 |
*/ |
| 24 |
|
| 25 |
// If this file is called directly, abort. |
| 26 |
if ( ! defined( 'WPINC' ) ) { |
| 27 |
die('No Naughty Business Please !'); |
| 28 |
} |
| 29 |
|
| 30 |
// Abort loading if WordPress is upgrading |
| 31 |
if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) { |
| 32 |
return; |
| 33 |
} |
| 34 |
|
| 35 |
/** |
| 36 |
* Check plugin requirements |
| 37 |
* ===========================================================================*/ |
| 38 |
|
| 39 |
// Don't check the requirements if it's frontend or AUXIN_DUBUG set to false |
| 40 |
if( is_admin() || false === get_transient( 'auxels_plugin_requirements_check' ) ){ |
| 41 |
|
| 42 |
if( ! class_exists('Auxin_Plugin_Requirements') ){ |
| 43 |
require_once( plugin_dir_path( __FILE__ ) . 'includes/classes/class-auxin-plugin-requirements.php' ); |
| 44 |
} |
| 45 |
|
| 46 |
$plugin_requirements = new Auxin_Plugin_Requirements(); |
| 47 |
$plugin_requirements->requirements = array( |
| 48 |
|
| 49 |
'plugins' => array( |
| 50 |
array( |
| 51 |
'name' => __('Page Builder by SiteOrigin', 'auxin-elements'), // The plugin name. |
| 52 |
'basename' => 'siteorigin-panels/siteorigin-panels.php', // The plugin basename (typically the folder name and main php file) |
| 53 |
'required' => false, // If true, the user will be notified with a notice to install the plugin. |
| 54 |
'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher. |
| 55 |
'dependency' => true, // If true, and the plugin is activated, the plugin will be loaded before as a dependeny. |
| 56 |
'is_callable' => '' // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 57 |
), |
| 58 |
array( |
| 59 |
'name' => __('SiteOrigin Widgets Bundle', 'auxin-elements'), // The plugin name. |
| 60 |
'basename' => 'so-widgets-bundle/so-widgets-bundle.php', // The plugin basename (typically the folder name and main php file) |
| 61 |
'required' => false, // If true, the user will be notified with a notice to install the plugin. |
| 62 |
'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher. |
| 63 |
'dependency' => true, // If true, and the plugin is activated, the plugin will be loaded before as a dependeny. |
| 64 |
'is_callable' => '' // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 65 |
) |
| 66 |
), |
| 67 |
|
| 68 |
'themes' => array( |
| 69 |
array( |
| 70 |
'name' => __('Phlox', 'auxin-elements'), // The theme name. |
| 71 |
'version' => '1.6.18', // E.g. 1.0.0. If set, the active theme must be this version or higher. |
| 72 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active. |
| 73 |
'file_exists' => get_template_directory() . '/auxin/auxin-include/auxin.php' // If set, this file will be checked for availability to determine if a theme is active. |
| 74 |
) |
| 75 |
), |
| 76 |
|
| 77 |
'php' => array( |
| 78 |
'version' => '5.3.0' // The minimum PHP version for this plugin, otherwise, throw a notice |
| 79 |
), |
| 80 |
|
| 81 |
'config' => array( |
| 82 |
'plugin_name' => __('Phlox Core Elements', 'auxin-elements'), // Current plugin name. |
| 83 |
'plugin_basename' => plugin_basename( __FILE__ ), |
| 84 |
'plugin_dir_path' => plugin_dir_path( __FILE__ ), |
| 85 |
'debug' => false |
| 86 |
) |
| 87 |
|
| 88 |
); |
| 89 |
|
| 90 |
// Check the requirements |
| 91 |
$validation = $plugin_requirements->validate(); |
| 92 |
|
| 93 |
// If the requirements were not met, dont initialize the plugin |
| 94 |
if( true !== $validation ){ |
| 95 |
return; |
| 96 |
// cache the validation result and skip the extra checks on frontend for cache period |
| 97 |
} else { |
| 98 |
set_transient( 'auxels_plugin_requirements_check', true, 15 * MINUTE_IN_SECONDS ); |
| 99 |
} |
| 100 |
} |
| 101 |
|
| 102 |
/** |
| 103 |
* Initialize the plugin |
| 104 |
* ===========================================================================*/ |
| 105 |
|
| 106 |
require_once( plugin_dir_path( __FILE__ ) . 'includes/define.php' ); |
| 107 |
require_once( plugin_dir_path( __FILE__ ) . 'public/class-auxels.php' ); |
| 108 |
|
| 109 |
// Register hooks that are fired when the plugin is activated or deactivated. |
| 110 |
register_activation_hook ( __FILE__, array( 'AUXELS', 'activate' ) ); |
| 111 |
register_deactivation_hook( __FILE__, array( 'AUXELS', 'deactivate' ) ); |
| 112 |
|
| 113 |
/*============================================================================*/ |
| 114 |
|