| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Astra Hooks |
| 4 |
* Plugin URI: https://wpastra.com/ |
| 5 |
* Description: Customizer Hooks for Theme. |
| 6 |
* Version: 1.0.2 |
| 7 |
* Author: Brainstorm Force |
| 8 |
* Author URI: http://www.brainstormforce.com |
| 9 |
* Text Domain: astra-hooks |
| 10 |
* |
| 11 |
* @package Astra Hooks |
| 12 |
*/ |
| 13 |
|
| 14 |
/** |
| 15 |
* Exit if accessed directly. |
| 16 |
*/ |
| 17 |
if ( ! defined( 'ABSPATH' ) ) { |
| 18 |
exit(); |
| 19 |
} |
| 20 |
|
| 21 |
/** |
| 22 |
* Astra Hooks Init |
| 23 |
*/ |
| 24 |
if ( ! function_exists( 'astra_hooks_init' ) ) { |
| 25 |
|
| 26 |
/** |
| 27 |
* Astra Hooks Init |
| 28 |
* |
| 29 |
* @since 1.0.0 |
| 30 |
* @return void |
| 31 |
*/ |
| 32 |
function astra_hooks_init() { |
| 33 |
|
| 34 |
/** |
| 35 |
* Check if Astra theme active |
| 36 |
*/ |
| 37 |
if ( defined( 'ASTRA_THEME_SETTINGS' ) ) { |
| 38 |
|
| 39 |
/** |
| 40 |
* Set constants. |
| 41 |
*/ |
| 42 |
define( 'ASTRA_HOOKS_FILE', __FILE__ ); |
| 43 |
define( 'ASTRA_HOOKS_BASE', plugin_basename( ASTRA_HOOKS_FILE ) ); |
| 44 |
define( 'ASTRA_HOOKS_DIR', plugin_dir_path( ASTRA_HOOKS_FILE ) ); |
| 45 |
define( 'ASTRA_HOOKS_URI', plugins_url( '/', ASTRA_HOOKS_FILE ) ); |
| 46 |
define( 'ASTRA_HOOKS_VER', '1.0.2' ); |
| 47 |
|
| 48 |
/** |
| 49 |
* Astra Hooks |
| 50 |
*/ |
| 51 |
require_once ASTRA_HOOKS_DIR . 'classes/class-astra-hooks.php'; |
| 52 |
} |
| 53 |
} |
| 54 |
} |
| 55 |
add_action( 'after_setup_theme', 'astra_hooks_init' ); |
| 56 |
|