Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 9550566

Browse files
authored
Merge pull request #361 from xwp/revert/258
Fix syncing of post changes made in post preview customizer back to edit post screen
2 parents 763edf3 + 6f87070 commit 9550566

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

php/class-customize-posts-plugin.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)