@@ -71,6 +71,12 @@ public function __construct() {
7171 add_filter ( 'customize_loaded_components ' , array ( $ this , 'filter_customize_loaded_components ' ), 100 , 2 );
7272 add_action ( 'customize_register ' , array ( $ this , 'load_support_classes ' ) );
7373 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 ();
7480 }
7581
7682 /**
@@ -170,12 +176,6 @@ function filter_customize_loaded_components( $components, $wp_customize ) {
170176 require_once dirname ( __FILE__ ) . '/class-wp-customize-posts.php ' ;
171177 if ( in_array ( 'posts ' , $ components , true ) ) {
172178 $ 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 ();
179179 }
180180
181181 return $ components ;
0 commit comments