@@ -70,12 +70,6 @@ public function __construct() {
70
70
add_filter ( 'customize_loaded_components ' , array ( $ this , 'add_posts_to_customize_loaded_components ' ), 0 , 1 );
71
71
add_filter ( 'customize_loaded_components ' , array ( $ this , 'filter_customize_loaded_components ' ), 100 , 2 );
72
72
add_action ( 'customize_register ' , array ( $ this , 'load_support_classes ' ) );
73
-
74
- require_once dirname ( __FILE__ ) . '/class-wp-customize-postmeta-controller.php ' ;
75
- require_once dirname ( __FILE__ ) . '/class-wp-customize-page-template-controller.php ' ;
76
- require_once dirname ( __FILE__ ) . '/class-wp-customize-featured-image-controller.php ' ;
77
- $ this ->page_template_controller = new WP_Customize_Page_Template_Controller ();
78
- $ this ->featured_image_controller = new WP_Customize_Featured_Image_Controller ();
79
73
}
80
74
81
75
/**
@@ -175,6 +169,12 @@ function filter_customize_loaded_components( $components, $wp_customize ) {
175
169
require_once dirname ( __FILE__ ) . '/class-wp-customize-posts.php ' ;
176
170
if ( in_array ( 'posts ' , $ components , true ) ) {
177
171
$ wp_customize ->posts = new WP_Customize_Posts ( $ wp_customize );
172
+
173
+ require_once dirname ( __FILE__ ) . '/class-wp-customize-postmeta-controller.php ' ;
174
+ require_once dirname ( __FILE__ ) . '/class-wp-customize-page-template-controller.php ' ;
175
+ require_once dirname ( __FILE__ ) . '/class-wp-customize-featured-image-controller.php ' ;
176
+ $ this ->page_template_controller = new WP_Customize_Page_Template_Controller ();
177
+ $ this ->featured_image_controller = new WP_Customize_Featured_Image_Controller ();
178
178
}
179
179
180
180
return $ components ;
0 commit comments