-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcornerstone-code-blocks.php
More file actions
39 lines (32 loc) · 1.1 KB
/
cornerstone-code-blocks.php
File metadata and controls
39 lines (32 loc) · 1.1 KB
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
<?php
/*
Plugin Name: Cornerstone Code Blocks
Plugin URI: https://github.com/chuckfairy/cornerstone-code-blocks
Description: Code blocks in Cornerstone with Syntax Highlighting from Highlight.js
Version: 1.0.4
Author: Chuckfairy
Author URI: https://chuckfairy.com/
Text Domain: cornerstone
Themeco Plugin: cornerstone-code-blocks
*/
define('CS_CODE_BLOCKS_URI', plugin_dir_url(__FILE__));
define('CS_CODE_BLOCKS_PATH', plugin_dir_path(__FILE__));
define('CS_CODE_BLOCKS_VERSION', '1.0.4');
// Init
add_action('init', function() {
if (!function_exists('cornerstone')) {
trigger_error('Cornerstone is not installed, Cornerstone Code Blocks does not work without it');
return;
}
// Includes for enqueue and Element registry
require_once(__DIR__ . '/extension/Enqueue.php');
require_once(__DIR__ . '/extension/Element.php');
});
// Load in dynamic options
add_action('cs_dynamic_content_register', function() {
require_once(__DIR__ . '/extension/DynamicOptions.php');
});
// Prefab registry
add_action('cs_register_prefab_elements', function() {
require_once(__DIR__ . '/extension/Prefabs.php');
});