PluginProbe
WPGraphQL / 2.22.0
WPGraphQL v2.22.0
2.22.3 2.22.2 2.22.1 2.22.0 2.21.1 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.1 2.15.0 2.14.1 2.14.0 2.13.0 2.2.0 2.3.0 2.3.3 2.3.6 2.3.8 2.5.0 2.5.1 2.5.2 2.5.3 All 177 releases
wp-graphql / constants.php

constants.php in WPGraphQL 2.22.0, at constants.php

39 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Sets up constants for use throughout the plugin and by other extending plugins.
4 *
5 * This is in its own file so that it can be used via the autoloaded classes, but also
6 * can be pulled in when composer dependencies have not been installed.
7 *
8 * @return void
9 */
10 function graphql_setup_constants() {
11
12 // Whether to autoload the files or not.
13 // This must be defined here and not within the WPGraphQL.php because this constant
14 // determines whether to autoload classes or not
15 if ( ! defined( 'WPGRAPHQL_AUTOLOAD' ) ) {
16 define( 'WPGRAPHQL_AUTOLOAD', true );
17 }
18
19 // Plugin version.
20 if ( ! defined( 'WPGRAPHQL_VERSION' ) ) {
21 define( 'WPGRAPHQL_VERSION', '2.22.0' );
22 }
23
24 // Plugin Folder Path.
25 if ( ! defined( 'WPGRAPHQL_PLUGIN_DIR' ) ) {
26 define( 'WPGRAPHQL_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
27 }
28
29 // Plugin Root File.
30 if ( ! defined( 'WPGRAPHQL_PLUGIN_FILE' ) ) {
31 define( 'WPGRAPHQL_PLUGIN_FILE', WPGRAPHQL_PLUGIN_DIR . '/wp-graphql.php' );
32 }
33
34 // The minimum version of PHP this plugin requires to work properly
35 if ( ! defined( 'GRAPHQL_MIN_PHP_VERSION' ) ) {
36 define( 'GRAPHQL_MIN_PHP_VERSION', '7.4' );
37 }
38 }
39