Changeset 27586
- Timestamp:
- 03/18/2014 04:47:47 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-widgets.php
r27585 r27586 42 42 add_filter( 'is_active_sidebar', array( __CLASS__, 'tally_sidebars_via_is_active_sidebar_calls' ), 10, 2 ); 43 43 add_filter( 'dynamic_sidebar_has_widgets', array( __CLASS__, 'tally_sidebars_via_dynamic_sidebar_calls' ), 10, 2 ); 44 45 /**46 * Special filter for Settings Revisions plugin until it can handle47 * dynamically creating settings. Normally this should be handled by48 * a setting's sanitize_js_callback, but when restoring an old revision49 * it may include settings which do not currently exist, and so they50 * do not have the opportunity to be sanitized as needed. Furthermore,51 * we have to add this filter here because the customizer is not52 * initialized in WP Ajax, which is where Settings Revisions currently53 * needs to apply this filter at times.54 */55 add_filter( 'temp_customize_sanitize_js', array( __CLASS__, 'temp_customize_sanitize_js' ), 10, 2 );56 44 } 57 45 … … 592 580 593 581 /** 594 * Special filter for Settings Revisions plugin until it can handle595 * dynamically creating settings.596 *597 * @param mixed $value598 * @param stdClass|WP_Customize_Setting $setting599 * @return mixed600 */601 static function temp_customize_sanitize_js( $value, $setting ) {602 if ( preg_match( '/^widget_/', $setting->id ) && $setting->type === 'option' ) {603 $value = self::sanitize_widget_js_instance( $value );604 }605 return $value;606 }607 608 /**609 582 * Build up an index of all available widgets for use in Backbone models 610 583 *
Note: See TracChangeset
for help on using the changeset viewer.