@@ -71,6 +71,12 @@ public function __construct() {
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
73
add_action ( 'delete_post ' , array ( $ this , 'cleanup_autodraft_on_changeset_delete ' ) );
74
+
75
+ require_once dirname ( __FILE__ ) . '/class-wp-customize-postmeta-controller.php ' ;
76
+ require_once dirname ( __FILE__ ) . '/class-wp-customize-page-template-controller.php ' ;
77
+ require_once dirname ( __FILE__ ) . '/class-wp-customize-featured-image-controller.php ' ;
78
+ $ this ->page_template_controller = new WP_Customize_Page_Template_Controller ();
79
+ $ this ->featured_image_controller = new WP_Customize_Featured_Image_Controller ();
74
80
}
75
81
76
82
/**
@@ -170,12 +176,6 @@ function filter_customize_loaded_components( $components, $wp_customize ) {
170
176
require_once dirname ( __FILE__ ) . '/class-wp-customize-posts.php ' ;
171
177
if ( in_array ( 'posts ' , $ components , true ) ) {
172
178
$ wp_customize ->posts = new WP_Customize_Posts ( $ wp_customize );
173
-
174
- require_once dirname ( __FILE__ ) . '/class-wp-customize-postmeta-controller.php ' ;
175
- require_once dirname ( __FILE__ ) . '/class-wp-customize-page-template-controller.php ' ;
176
- require_once dirname ( __FILE__ ) . '/class-wp-customize-featured-image-controller.php ' ;
177
- $ this ->page_template_controller = new WP_Customize_Page_Template_Controller ();
178
- $ this ->featured_image_controller = new WP_Customize_Featured_Image_Controller ();
179
179
}
180
180
181
181
return $ components ;
0 commit comments