-
Notifications
You must be signed in to change notification settings - Fork 2
/
detailer.php
41 lines (33 loc) · 934 Bytes
/
detailer.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
<?php
/**
* Bootstrap file to launch the plugin.
*
* @wordpress-plugin
* Plugin Name: Detailer
* Plugin URI: https://github.com/davidyeiser/detailer
* Description: Plugin to create custom Gutenberg block, Book Details.
* Version: 0.1
* Author: David Yeiser
* Author URI: https://davidyeiser.com/
* License: GPL2+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
namespace DavidYeiser\Detailer;
// Exit if accessed directly.
defined('ABSPATH') || exit;
// Gets this plugin's absolute directory path.
function _get_plugin_directory() {
return __DIR__;
}
// Gets this plugin's URL.
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';
// Load dynamic blocks
include __DIR__ . '/blocks/book-details/index.php';