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

Fix syncing of post changes made in post preview customizer back to edit post screen #361

Merged
merged 1 commit into from
Aug 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions php/class-customize-posts-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public function __construct() {
add_filter( 'customize_loaded_components', array( $this, 'filter_customize_loaded_components' ), 100, 2 );
add_action( 'customize_register', array( $this, 'load_support_classes' ) );
add_action( 'delete_post', array( $this, 'cleanup_autodraft_on_changeset_delete' ) );

require_once dirname( __FILE__ ) . '/class-wp-customize-postmeta-controller.php';
require_once dirname( __FILE__ ) . '/class-wp-customize-page-template-controller.php';
require_once dirname( __FILE__ ) . '/class-wp-customize-featured-image-controller.php';
$this->page_template_controller = new WP_Customize_Page_Template_Controller();
$this->featured_image_controller = new WP_Customize_Featured_Image_Controller();
}

/**
Expand Down Expand Up @@ -170,12 +176,6 @@ function filter_customize_loaded_components( $components, $wp_customize ) {
require_once dirname( __FILE__ ) . '/class-wp-customize-posts.php';
if ( in_array( 'posts', $components, true ) ) {
$wp_customize->posts = new WP_Customize_Posts( $wp_customize );

require_once dirname( __FILE__ ) . '/class-wp-customize-postmeta-controller.php';
require_once dirname( __FILE__ ) . '/class-wp-customize-page-template-controller.php';
require_once dirname( __FILE__ ) . '/class-wp-customize-featured-image-controller.php';
$this->page_template_controller = new WP_Customize_Page_Template_Controller();
$this->featured_image_controller = new WP_Customize_Featured_Image_Controller();
}

return $components;
Expand Down