@@ -5,34 +5,34 @@ |
||
5 | 5 | global $wp_version; |
6 | 6 | |
7 | 7 | if (!is_admin() && version_compare('7.1', phpversion(), '>')) { |
8 | - wp_die( |
|
9 | - __('You must be using PHP 7.1.0 or greater.', 'castor'), |
|
10 | - __('Unsupported PHP version', 'castor') |
|
11 | - ); |
|
8 | + wp_die( |
|
9 | + __('You must be using PHP 7.1.0 or greater.', 'castor'), |
|
10 | + __('Unsupported PHP version', 'castor') |
|
11 | + ); |
|
12 | 12 | } |
13 | 13 | if (!is_admin() && version_compare('5.2', $wp_version, '>')) { |
14 | - wp_die( |
|
15 | - __('You must be using WordPress 5.2.0 or greater.', 'castor'), |
|
16 | - __('Unsupported WordPress version', 'castor') |
|
17 | - ); |
|
14 | + wp_die( |
|
15 | + __('You must be using WordPress 5.2.0 or greater.', 'castor'), |
|
16 | + __('Unsupported WordPress version', 'castor') |
|
17 | + ); |
|
18 | 18 | } |
19 | 19 | if (is_customize_preview() && filter_input(INPUT_GET, 'theme')) { |
20 | - wp_die( |
|
21 | - __('Theme must be activated prior to using the customizer.', 'castor') |
|
22 | - ); |
|
20 | + wp_die( |
|
21 | + __('Theme must be activated prior to using the customizer.', 'castor') |
|
22 | + ); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | if (version_compare($wp_version, '5.3', '<')) { |
26 | - require_once ABSPATH.'/'.WPINC.'/class-oembed.php'; |
|
26 | + require_once ABSPATH.'/'.WPINC.'/class-oembed.php'; |
|
27 | 27 | } else { |
28 | - require_once ABSPATH.'/'.WPINC.'/class-wp-oembed.php'; |
|
28 | + require_once ABSPATH.'/'.WPINC.'/class-wp-oembed.php'; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | if (!function_exists('castor_app')) { |
32 | - function castor_app() |
|
33 | - { |
|
34 | - return \GeminiLabs\Castor\Application::getInstance(); |
|
35 | - } |
|
32 | + function castor_app() |
|
33 | + { |
|
34 | + return \GeminiLabs\Castor\Application::getInstance(); |
|
35 | + } |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | \GeminiLabs\Castor\Application::getInstance()->init(); |
@@ -1,34 +1,34 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -defined('WPINC') || die; |
|
3 | +defined( 'WPINC' ) || die; |
|
4 | 4 | |
5 | 5 | global $wp_version; |
6 | 6 | |
7 | -if (!is_admin() && version_compare('7.1', phpversion(), '>')) { |
|
7 | +if( !is_admin() && version_compare( '7.1', phpversion(), '>' ) ) { |
|
8 | 8 | wp_die( |
9 | - __('You must be using PHP 7.1.0 or greater.', 'castor'), |
|
10 | - __('Unsupported PHP version', 'castor') |
|
9 | + __( 'You must be using PHP 7.1.0 or greater.', 'castor' ), |
|
10 | + __( 'Unsupported PHP version', 'castor' ) |
|
11 | 11 | ); |
12 | 12 | } |
13 | -if (!is_admin() && version_compare('5.2', $wp_version, '>')) { |
|
13 | +if( !is_admin() && version_compare( '5.2', $wp_version, '>' ) ) { |
|
14 | 14 | wp_die( |
15 | - __('You must be using WordPress 5.2.0 or greater.', 'castor'), |
|
16 | - __('Unsupported WordPress version', 'castor') |
|
15 | + __( 'You must be using WordPress 5.2.0 or greater.', 'castor' ), |
|
16 | + __( 'Unsupported WordPress version', 'castor' ) |
|
17 | 17 | ); |
18 | 18 | } |
19 | -if (is_customize_preview() && filter_input(INPUT_GET, 'theme')) { |
|
19 | +if( is_customize_preview() && filter_input( INPUT_GET, 'theme' ) ) { |
|
20 | 20 | wp_die( |
21 | - __('Theme must be activated prior to using the customizer.', 'castor') |
|
21 | + __( 'Theme must be activated prior to using the customizer.', 'castor' ) |
|
22 | 22 | ); |
23 | 23 | } |
24 | 24 | |
25 | -if (version_compare($wp_version, '5.3', '<')) { |
|
25 | +if( version_compare( $wp_version, '5.3', '<' ) ) { |
|
26 | 26 | require_once ABSPATH.'/'.WPINC.'/class-oembed.php'; |
27 | 27 | } else { |
28 | 28 | require_once ABSPATH.'/'.WPINC.'/class-wp-oembed.php'; |
29 | 29 | } |
30 | 30 | |
31 | -if (!function_exists('castor_app')) { |
|
31 | +if( !function_exists( 'castor_app' ) ) { |
|
32 | 32 | function castor_app() |
33 | 33 | { |
34 | 34 | return \GeminiLabs\Castor\Application::getInstance(); |
@@ -24,7 +24,8 @@ |
||
24 | 24 | |
25 | 25 | if (version_compare($wp_version, '5.3', '<')) { |
26 | 26 | require_once ABSPATH.'/'.WPINC.'/class-oembed.php'; |
27 | -} else { |
|
27 | +} |
|
28 | +else { |
|
28 | 29 | require_once ABSPATH.'/'.WPINC.'/class-wp-oembed.php'; |
29 | 30 | } |
30 | 31 |