mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-02 00:00:15 +00:00
Customizer: Fix previewing and applying widgets when previewing another theme.
* Unset `wp_get_sidebars_widgets()`' non-admin cache var `$_wp_sidebars_widgets` in Customize theme preview. * Add `WP_Customize_Setting::$dirty` so that settings can be initially-dirty when the Customizer loads. * Mark `old_sidebars_widgets_data` setting initially-dirty. * Mark all `sidebars_widgets` settings as initially-dirty during theme switch. props westonruter. see #31484. git-svn-id: https://develop.svn.wordpress.org/trunk@31705 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -60,6 +60,20 @@ class WP_Customize_Setting {
|
||||
public $sanitize_callback = '';
|
||||
public $sanitize_js_callback = '';
|
||||
|
||||
/**
|
||||
* Whether or not the setting is initially dirty when created.
|
||||
*
|
||||
* This is used to ensure that a setting will be sent from the pane to the
|
||||
* preview when loading the Customizer. Normally a setting only is synced to
|
||||
* the preview if it has been changed. This allows the setting to be sent
|
||||
* from the start.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
* @var bool
|
||||
*/
|
||||
public $dirty = false;
|
||||
|
||||
protected $id_data = array();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user