| 1 |
<?php |
| 2 |
/** |
| 3 |
* Genesis Simple Sidebars constants. |
| 4 |
* |
| 5 |
* @package genesis-simple-sidebars |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* Load the plugin file. |
| 10 |
*/ |
| 11 |
|
| 12 |
if ( ! defined( 'ABSPATH' ) ) { |
| 13 |
exit; |
| 14 |
} |
| 15 |
|
| 16 |
define( 'GENESIS_SIMPLE_SIDEBARS_SETTINGS_FIELD', 'genesis_simple_sidebars_settings' ); |
| 17 |
define( 'GENESIS_SIMPLE_SIDEBARS_VERSION', '2.2.3' ); |
| 18 |
define( 'GENESIS_SIMPLE_SIDEBARS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); |
| 19 |
define( 'GENESIS_SIMPLE_SIDEBARS_PLUGIN_URL', plugins_url( '', __FILE__ ) ); |
| 20 |
|
| 21 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-genesis-simple-sidebars.php'; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
/** |
| 26 |
* Helper function to retrieve the static object without using globals. |
| 27 |
* |
| 28 |
* @since 2.1.0 |
| 29 |
*/ |
| 30 |
function genesis_simple_sidebars() { |
| 31 |
|
| 32 |
static $object; |
| 33 |
|
| 34 |
if ( null === $object ) { |
| 35 |
$object = new Genesis_Simple_Sidebars(); |
| 36 |
} |
| 37 |
|
| 38 |
return $object; |
| 39 |
} |
| 40 |
/** |
| 41 |
* Initialize the object on `plugins_loaded`. |
| 42 |
*/ |
| 43 |
add_action( 'plugins_loaded', array( Genesis_Simple_Sidebars(), 'init' ) ); |
| 44 |
|