-
Notifications
You must be signed in to change notification settings - Fork 0
/
wp-block-template-part.php
34 lines (30 loc) · 1.12 KB
/
wp-block-template-part.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
<?php
/**
* Plugin Name: Template Part Block
* Description: Gutenberg block to render a template part inside a query loop
* Version: 0.0.0-development
* Author: CloudCatch
* Author URI: https://cloudcatch.io
* Text Domain: wp-block-template-part
* Domain Path: /languages/
* Contributors: cloudcatch, cloudcatch, dkjensen
* Requires PHP: 7.0.0
*
* @package CloudCatch\WpBlockTemplatePart
*/
namespace CloudCatch\WpBlockTemplatePart;
define( 'WP_BLOCK_TEMPLATE_PART_DIR', \plugin_dir_path( __FILE__ ) );
define( 'WP_BLOCK_TEMPLATE_PART_URL', \plugin_dir_url( __FILE__ ) );
define( 'WP_BLOCK_TEMPLATE_PART_VER', '0.0.0-development' );
require_once WP_BLOCK_TEMPLATE_PART_DIR . '/lib/functions/block.php';
require_once WP_BLOCK_TEMPLATE_PART_DIR . '/lib/functions/rest-api.php';
require_once WP_BLOCK_TEMPLATE_PART_DIR . '/lib/functions/template.php';
/**
* Setup plugin
*
* @return void
*/
function initialize() {
\load_plugin_textdomain( 'wp-block-template-part', false, WP_BLOCK_TEMPLATE_PART_DIR . '/languages' );
}
\add_action( 'plugins_loaded', __NAMESPACE__ . '\initialize' );