forked from zgordon/gutenberg-course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsforwp-example-blocks.php
executable file
·69 lines (59 loc) · 1.46 KB
/
jsforwp-example-blocks.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
<?php
/**
* Plugin's bootstrap file to launch the plugin.
*
* @package Gutenberg_Courses\Example_Blocks
* @author Zac Gordon (@zgordon)
* @license GPL2+
*
* @wordpress-plugin
* Plugin Name: Gutenberg - Example Blocks
* Plugin URI: https://gutenberg.courses
* Description: A plugin containing example blocks for developers. From <a href="https://gutenberg.courses/development">Zac Gordon's Gutenberg Development Course</a>.
* Version: 3.1.0
* Author: Zac Gordon
* Author URI: https://twitter.com/zgordon
* Text Domain: jsforwpblocks
* Domain Path: /languages
* License: GPL2+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
namespace Gutenberg_Courses\Example_Blocks;
// Exit if accessed directly.
defined('ABSPATH') || exit;
/**
* Gets this plugin's absolute directory path.
*
* @since 2.1.0
* @ignore
* @access private
*
* @return string
*/
function _get_plugin_directory() {
return __DIR__;
}
/**
* Gets this plugin's URL.
*
* @since 2.1.0
* @ignore
* @access private
*
* @return string
*/
function _get_plugin_url() {
static $plugin_url;
if ( empty( $plugin_url ) ) {
$plugin_url = plugins_url( null, __FILE__ );
}
return $plugin_url;
}
// Enqueue JS and CSS
include __DIR__ . '/lib/enqueue-scripts.php';
// Register meta boxes
include __DIR__ . '/lib/meta-boxes.php';
// Block Templates
include __DIR__ . '/lib/block-templates.php';
// Dynamic Blocks
include __DIR__ . '/blocks/12-dynamic/index.php';