2020-09-08 00:12:18 +00:00
|
|
|
<?php
|
2021-02-23 02:09:46 +00:00
|
|
|
/*
|
|
|
|
Plugin Name: Blocksy Tainacan
|
|
|
|
Plugin URI: https://tainacan.org/
|
|
|
|
Description: Tainacan support for Blocksy theme
|
|
|
|
Author: tainacan
|
|
|
|
Version: 0.1.0
|
|
|
|
Text Domain: blocksy-tainacan
|
|
|
|
License: GPLv2 or later
|
|
|
|
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (! defined('WP_DEBUG') ) {
|
2020-09-08 00:12:18 +00:00
|
|
|
die( 'Direct access forbidden.' );
|
|
|
|
}
|
2020-09-11 02:47:04 +00:00
|
|
|
|
2021-02-23 02:09:46 +00:00
|
|
|
/** Theme/plugin version */
|
2021-02-18 00:01:23 +00:00
|
|
|
const BLOCKSY_TAINACAN_VERSION = '0.1.0';
|
2021-04-02 15:44:37 +00:00
|
|
|
const BLOCKSY_TAINACAN_IS_CHILD_THEME = true;
|
2020-09-24 02:39:33 +00:00
|
|
|
|
2021-02-28 00:52:11 +00:00
|
|
|
/* Tools to define our next constants */
|
|
|
|
require 'utils.php';
|
|
|
|
|
|
|
|
$plugin_root_url = blocksy_tainacan_get_plugin_dir_url();
|
2021-02-23 02:09:46 +00:00
|
|
|
define('BLOCKSY_TAINACAN_PLUGIN_URL_PATH', $plugin_root_url);
|
2020-11-18 01:04:40 +00:00
|
|
|
|
2021-02-28 00:52:11 +00:00
|
|
|
$plugin_root_dir = blocksy_tainacan_get_plugin_dir_path();
|
2021-02-23 02:09:46 +00:00
|
|
|
define('BLOCKSY_TAINACAN_PLUGIN_DIR_PATH', $plugin_root_dir);
|
2020-11-18 01:04:40 +00:00
|
|
|
|
2021-02-28 00:52:11 +00:00
|
|
|
$blocksy_tainacan_is_blocksy_activated = blocksy_tainacan_is_blocksy_activated();
|
|
|
|
define('BLOCKSY_TAINACAN_IS_BLOCKSY_ACTIVATED', $blocksy_tainacan_is_blocksy_activated);
|
2020-12-23 12:38:30 +00:00
|
|
|
|
2021-04-02 15:42:39 +00:00
|
|
|
/* This should only be used if we're in the child theme or if is a plugin and blocksy theme is installed */
|
|
|
|
if ( BLOCKSY_TAINACAN_IS_CHILD_THEME || ( BLOCKSY_TAINACAN_IS_BLOCKSY_ACTIVATED && !BLOCKSY_TAINACAN_IS_CHILD_THEME ) ) {
|
2021-02-28 00:52:11 +00:00
|
|
|
|
|
|
|
/* Basic styles and script enqueues */
|
|
|
|
require BLOCKSY_TAINACAN_PLUGIN_DIR_PATH . '/inc/enqueues.php';
|
|
|
|
|
|
|
|
/* Template redirection necessary only if in a plugin */
|
2021-04-02 15:42:39 +00:00
|
|
|
if ( !BLOCKSY_TAINACAN_IS_CHILD_THEME ) {
|
2021-02-28 00:52:11 +00:00
|
|
|
require BLOCKSY_TAINACAN_PLUGIN_DIR_PATH . '/inc/plugin.php';
|
|
|
|
}
|
2020-12-23 12:38:30 +00:00
|
|
|
|
2021-02-28 00:52:11 +00:00
|
|
|
/* Requires several settings, functions and helpers */
|
|
|
|
require BLOCKSY_TAINACAN_PLUGIN_DIR_PATH . '/inc/integration.php';
|
|
|
|
require BLOCKSY_TAINACAN_PLUGIN_DIR_PATH . '/inc/customizer.php';
|
|
|
|
require BLOCKSY_TAINACAN_PLUGIN_DIR_PATH . '/inc/navigation.php';
|
|
|
|
}
|