-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathaesop-core.php
executable file
·94 lines (74 loc) · 2.59 KB
/
aesop-core.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
/**
* Open-sourced suite of components that empower interactive storytelling.
*
*
* @package Aesop_Core
* @author Nick Haskins <[email protected]>, Hyun Supul <[email protected]>
* @license GPL-2.0+
* @link http://aesopinteractive.com
* @copyright 2016-2021 Hyun Supul <[email protected]>
*
* @wordpress-plugin
* Plugin Name: Aesop Story Engine
* Plugin URI: https://aesopstoryengine.com
* Description: Open-sourced suite of components that empower interactive storytelling.
* Version: 2.3.1
* Author: Aesopinteractive
* Author URI: https://aesopstoryengine.com
* Text Domain: aesop-core
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/hyunsupul/aesop-core
* Github Branch: dev
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Set some constants
define( 'AI_CORE_VERSION', '2.3.1' );
define( 'AI_CORE_DIR', plugin_dir_path( __FILE__ ) );
define( 'AI_CORE_URL', plugins_url( '', __FILE__ ) );
/*
----------------------------------------------------------------------------*
* Public-Facing Functionality
*----------------------------------------------------------------------------*/
require_once AI_CORE_DIR.'public/class-aesop-core.php';
/*
* Register hooks that are fired when the plugin is activated or deactivated.
* When the plugin is deleted, the uninstall.php file is loaded.
*/
register_activation_hook( __FILE__, array( 'Aesop_Core', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'Aesop_Core', 'deactivate' ) );
add_action( 'plugins_loaded', array( 'Aesop_Core', 'get_instance' ) );
/*
----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
/*
* The code below is intended to to give the lightest footprint possible.
*/
if ( is_admin() ) {
require_once AI_CORE_DIR.'admin/class-aesop-core-admin.php';
add_action( 'plugins_loaded', array( 'Aesop_Core_Admin', 'get_instance' ) );
}
/**
* Aesop Gutenberg Support.
*/
require_once( AI_CORE_DIR . 'blocks/index.php' );
add_filter( 'block_categories', function( $categories, $post ) {
/*if ( $post->post_type !== 'post' ) {
return $categories;
}*/
return array_merge(
$categories,
array(
array(
'slug' => 'aesop-story-engine',
'title' => __( 'Aesop Story Engine', 'ASE' ),
),
)
);
}, 10, 2 );