@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | public function __construct() |
17 | 17 | { |
18 | - $this->assets = sprintf( '%s/assets/', dirname( __DIR__ )); |
|
18 | + $this->assets = sprintf( '%s/assets/', dirname( __DIR__ ) ); |
|
19 | 19 | Facade::clearResolvedInstances(); |
20 | 20 | Facade::setFacadeApplication( $this ); |
21 | 21 | $this->registerAliases(); |
@@ -27,21 +27,21 @@ discard block |
||
27 | 27 | $controller = $this->make( 'Controller' ); |
28 | 28 | |
29 | 29 | // Action hooks |
30 | - add_action( 'after_setup_theme', [$controller, 'afterSetupTheme'], 20 ); |
|
31 | - add_action( 'login_head', [$controller, 'loadAdminFavicon'] ); |
|
32 | - add_action( 'admin_head', [$controller, 'loadAdminFavicon'] ); |
|
33 | - add_action( 'login_head', [$controller, 'login'] ); |
|
34 | - add_action( 'admin_enqueue_scripts', [$controller, 'registerAdminAssets'] ); |
|
35 | - add_action( 'wp_enqueue_scripts', [$controller, 'registerAssets'] ); |
|
36 | - add_action( 'customize_register', [$controller, 'registerCustomizer'] ); |
|
30 | + add_action( 'after_setup_theme', [$controller, 'afterSetupTheme'], 20 ); |
|
31 | + add_action( 'login_head', [$controller, 'loadAdminFavicon'] ); |
|
32 | + add_action( 'admin_head', [$controller, 'loadAdminFavicon'] ); |
|
33 | + add_action( 'login_head', [$controller, 'login'] ); |
|
34 | + add_action( 'admin_enqueue_scripts', [$controller, 'registerAdminAssets'] ); |
|
35 | + add_action( 'wp_enqueue_scripts', [$controller, 'registerAssets'] ); |
|
36 | + add_action( 'customize_register', [$controller, 'registerCustomizer'] ); |
|
37 | 37 | add_action( 'customize_preview_init', [$controller, 'registerCustomizerAssets'] ); |
38 | - add_action( 'widgets_init', [$controller, 'registerSidebars'] ); |
|
38 | + add_action( 'widgets_init', [$controller, 'registerSidebars'] ); |
|
39 | 39 | |
40 | 40 | // Filter hooks |
41 | - add_filter( 'body_class', [$controller, 'filterBodyClasses'] ); |
|
42 | - add_filter( 'template_include', [$controller, 'filterTemplate'] ); |
|
43 | - add_filter( 'login_headertext', [$controller, 'filterLoginTitle'] ); |
|
44 | - add_filter( 'login_headerurl', [$controller, 'filterLoginUrl'] ); |
|
41 | + add_filter( 'body_class', [$controller, 'filterBodyClasses'] ); |
|
42 | + add_filter( 'template_include', [$controller, 'filterTemplate'] ); |
|
43 | + add_filter( 'login_headertext', [$controller, 'filterLoginTitle'] ); |
|
44 | + add_filter( 'login_headerurl', [$controller, 'filterLoginUrl'] ); |
|
45 | 45 | |
46 | 46 | foreach( $this->getTemplateTypes() as $type ) { |
47 | 47 | add_filter( "{$type}_template_hierarchy", [$controller, 'filterTemplateHierarchy'] ); |
@@ -2,19 +2,19 @@ discard block |
||
2 | 2 | |
3 | 3 | global $wp_version; |
4 | 4 | |
5 | -if( !is_admin() && version_compare( '7.0', phpversion(), '>' )) { |
|
5 | +if( !is_admin() && version_compare( '7.0', phpversion(), '>' ) ) { |
|
6 | 6 | wp_die( |
7 | 7 | __( 'You must be using PHP 7.0.0 or greater.', 'castor' ), |
8 | 8 | __( 'Unsupported PHP version', 'castor' ) |
9 | 9 | ); |
10 | 10 | } |
11 | -if( !is_admin() && version_compare( '5.2', $wp_version, '>' )) { |
|
11 | +if( !is_admin() && version_compare( '5.2', $wp_version, '>' ) ) { |
|
12 | 12 | wp_die( |
13 | 13 | __( 'You must be using WordPress 5.2.0 or greater.', 'castor' ), |
14 | 14 | __( 'Unsupported WordPress version', 'castor' ) |
15 | 15 | ); |
16 | 16 | } |
17 | -if( is_customize_preview() && filter_input( INPUT_GET, 'theme' )) { |
|
17 | +if( is_customize_preview() && filter_input( INPUT_GET, 'theme' ) ) { |
|
18 | 18 | wp_die( |
19 | 19 | __( 'Theme must be activated prior to using the customizer.', 'castor' ) |
20 | 20 | ); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | require_once( ABSPATH.'/'.WPINC.'/class-oembed.php' ); |
24 | 24 | |
25 | -if( !function_exists( 'castor_app' )) { |
|
25 | +if( !function_exists( 'castor_app' ) ) { |
|
26 | 26 | function castor_app() { |
27 | 27 | return \GeminiLabs\Castor\Application::getInstance(); |
28 | 28 | } |