forked from wpengine/wp-graphql-content-blocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wp-graphql-content-blocks.php
46 lines (40 loc) · 1.17 KB
/
wp-graphql-content-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
<?php
/**
* Plugin Name: WPGraphQL Content Blocks
* Description: Extends WPGraphQL to support querying (Gutenberg) Blocks as data.
* Author: WP Engine
* Author URI: https://wpengine.com/
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wp-graphql-content-blocks
* Domain Path: /languages
* Version: 0.1.0
* Requires PHP: 7.2
* Requires at least: 5.7
*
* @package WPGraphQL\ContentBlocks
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'WPGRAPHQL_CONTENT_BLOCKS_DIR', dirname( __FILE__ ) );
if ( ! class_exists( 'WPGraphQLContentBlocks' ) ) {
require_once __DIR__ . '/includes/WPGraphQLContentBlocks.php';
}
if ( ! function_exists( 'wpgraphql_content_blocks_init' ) ) {
/**
* The main function that returns the WPGraphQLContentBlocks class
*
* @since 1.0.0
* @return object|WPGraphQLContentBlocks
*/
function wpgraphql_content_blocks_init() {
/**
* Return an instance of the action
*/
return \WPGraphQLContentBlocks::instance();
}
}
// Get the plugin running.
add_action( 'plugins_loaded', 'wpgraphql_content_blocks_init', 15 );
require WPGRAPHQL_CONTENT_BLOCKS_DIR . '/includes/utilities/functions.php';