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.34 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: 4.1.0
* Requires PHP: 7.4
* Requires at least: 5.7
*
* @package WPGraphQL\ContentBlocks
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'WPGRAPHQL_CONTENT_BLOCKS_DIR', __DIR__ );
define( 'WPGRAPHQL_CONTENT_BLOCKS_FILE', __FILE__ );
define( 'WPGRAPHQL_CONTENT_BLOCKS_URL', plugin_dir_url( __FILE__ ) );
define( 'WPGRAPHQL_CONTENT_BLOCKS_PATH', plugin_basename( WPGRAPHQL_CONTENT_BLOCKS_FILE ) );
define( 'WPGRAPHQL_CONTENT_BLOCKS_SLUG', dirname( plugin_basename( WPGRAPHQL_CONTENT_BLOCKS_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 0.0.1
*/
function wpgraphql_content_blocks_init(): void {
// Instantiate the plugin class.
WPGraphQLContentBlocks::instance();
}
}
// Get the plugin running.
add_action( 'plugins_loaded', 'wpgraphql_content_blocks_init', 15 );