Files

44 lines
935 B
PHP
Raw Permalink Normal View History

2017-03-01 19:51:34 -05:00
<?php
2019-04-22 17:28:46 -03:00
/**
* Genesis Simple Sidebars constants.
2019-04-22 17:28:46 -03:00
*
* @package genesis-simple-sidebars
*/
2017-03-01 19:51:34 -05:00
2019-04-22 17:28:46 -03:00
/**
* Load the plugin file.
*/
2017-03-01 19:51:34 -05:00
2019-04-22 17:28:46 -03:00
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
2017-03-01 19:51:34 -05:00
2019-04-22 17:28:46 -03:00
define( 'GENESIS_SIMPLE_SIDEBARS_SETTINGS_FIELD', 'genesis_simple_sidebars_settings' );
2024-03-06 15:07:10 +01:00
define( 'GENESIS_SIMPLE_SIDEBARS_VERSION', '2.2.3' );
2019-04-22 17:28:46 -03:00
define( 'GENESIS_SIMPLE_SIDEBARS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'GENESIS_SIMPLE_SIDEBARS_PLUGIN_URL', plugins_url( '', __FILE__ ) );
2017-03-01 19:51:34 -05:00
2019-04-22 17:28:46 -03:00
require_once plugin_dir_path( __FILE__ ) . 'includes/class-genesis-simple-sidebars.php';
2017-03-01 19:51:34 -05:00
/**
* Helper function to retrieve the static object without using globals.
*
* @since 2.1.0
*/
2019-04-22 17:28:46 -03:00
function genesis_simple_sidebars() {
2017-03-01 19:51:34 -05:00
static $object;
2019-04-22 17:28:46 -03:00
if ( null === $object ) {
$object = new Genesis_Simple_Sidebars();
2017-03-01 19:51:34 -05:00
}
return $object;
}
/**
2019-04-22 17:28:46 -03:00
* Initialize the object on `plugins_loaded`.
2017-03-01 19:51:34 -05:00
*/
add_action( 'plugins_loaded', array( Genesis_Simple_Sidebars(), 'init' ) );