Changeset 38810 for trunk/src/wp-includes/class-wp-customize-widgets.php
- Timestamp:
- 10/18/2016 08:04:36 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-widgets.php
r38766 r38810 94 94 $this->manager = $manager; 95 95 96 // Skip useless hooks when the user can't manage widgets anyway. 96 // See https://github.com/xwp/wp-customize-snapshots/blob/962586659688a5b1fd9ae93618b7ce2d4e7a421c/php/class-customize-snapshot-manager.php#L420-L449 97 add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_customize_dynamic_setting_args' ), 10, 2 ); 98 add_action( 'widgets_init', array( $this, 'register_settings' ), 95 ); 99 add_action( 'customize_register', array( $this, 'schedule_customize_register' ), 1 ); 100 101 // Skip remaining hooks when the user can't manage widgets anyway. 97 102 if ( ! current_user_can( 'edit_theme_options' ) ) { 98 103 return; 99 104 } 100 105 101 add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_customize_dynamic_setting_args' ), 10, 2 );102 add_action( 'widgets_init', array( $this, 'register_settings' ), 95 );103 106 add_action( 'wp_loaded', array( $this, 'override_sidebars_widgets_for_theme_switch' ) ); 104 107 add_action( 'customize_controls_init', array( $this, 'customize_controls_init' ) ); 105 add_action( 'customize_register', array( $this, 'schedule_customize_register' ), 1 );106 108 add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 107 109 add_action( 'customize_controls_print_styles', array( $this, 'print_styles' ) ); … … 277 279 $this->old_sidebars_widgets = wp_get_sidebars_widgets(); 278 280 add_filter( 'customize_value_old_sidebars_widgets_data', array( $this, 'filter_customize_value_old_sidebars_widgets_data' ) ); 281 $this->manager->set_post_value( 'old_sidebars_widgets_data', $this->old_sidebars_widgets ); // Override any value cached in changeset. 279 282 280 283 // retrieve_widgets() looks at the global $sidebars_widgets
Note: See TracChangeset
for help on using the changeset viewer.