File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change 2121define ( 'STATIC_DEPLOY_PATH ' , plugin_dir_path ( __FILE__ ) );
2222
2323if ( ! defined ( 'STATIC_DEPLOY_DEBUG ' ) ) {
24- if (
25- WP_DEBUG
26- || ( defined ( 'WP_CLI ' ) && WP_CLI ::get_config ( 'debug ' ) )
27- ) {
28- $ enabled = true ;
29- } else {
30- $ enabled = false ;
31- }
24+ $ enabled = WP_DEBUG || ( defined ( 'WP_CLI ' ) && WP_CLI ::get_config ( 'debug ' ) );
3225 define ( 'STATIC_DEPLOY_DEBUG ' , $ enabled );
3326}
3427
3528if ( file_exists ( STATIC_DEPLOY_PATH . 'vendor/autoload.php ' ) ) {
3629 require_once STATIC_DEPLOY_PATH . 'vendor/autoload.php ' ;
3730}
3831
39- if ( ! class_exists ( \StaticDeploy \Controller::class ) ) {
40- if ( file_exists ( STATIC_DEPLOY_PATH . 'src/StaticDeployException.php ' ) ) {
41- require_once STATIC_DEPLOY_PATH . 'src/StaticDeployException.php ' ;
42-
43- throw new StaticDeploy \StaticDeployException (
44- 'Looks like you \'re trying to activate Static Deploy from source code ' .
45- ', without compiling it first. '
46- );
47- }
32+ if ( ! class_exists ( \StaticDeploy \Controller::class )
33+ && file_exists ( STATIC_DEPLOY_PATH . 'src/StaticDeployException.php ' ) ) {
34+ require_once STATIC_DEPLOY_PATH . 'src/StaticDeployException.php ' ;
35+ throw new StaticDeploy \StaticDeployException (
36+ 'Looks like you \'re trying to activate Static Deploy from source code ' .
37+ ', without compiling it first. '
38+ );
4839}
4940
5041StaticDeploy \Controller::init ();
You can’t perform that action at this time.
0 commit comments