From 183e283e5658671612640af83788769d6121b138 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Tue, 18 Mar 2014 16:47:47 +0000 Subject: [PATCH] Widget Customizer: Remove special filter for Settings Revisions plugin. see #27112. git-svn-id: https://develop.svn.wordpress.org/trunk@27586 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-customize-widgets.php | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php index 207084736a..f52d59418a 100644 --- a/src/wp-includes/class-wp-customize-widgets.php +++ b/src/wp-includes/class-wp-customize-widgets.php @@ -41,18 +41,6 @@ class WP_Customize_Widgets { add_action( 'dynamic_sidebar', array( __CLASS__, 'tally_rendered_widgets' ) ); add_filter( 'is_active_sidebar', array( __CLASS__, 'tally_sidebars_via_is_active_sidebar_calls' ), 10, 2 ); add_filter( 'dynamic_sidebar_has_widgets', array( __CLASS__, 'tally_sidebars_via_dynamic_sidebar_calls' ), 10, 2 ); - - /** - * Special filter for Settings Revisions plugin until it can handle - * dynamically creating settings. Normally this should be handled by - * a setting's sanitize_js_callback, but when restoring an old revision - * it may include settings which do not currently exist, and so they - * do not have the opportunity to be sanitized as needed. Furthermore, - * we have to add this filter here because the customizer is not - * initialized in WP Ajax, which is where Settings Revisions currently - * needs to apply this filter at times. - */ - add_filter( 'temp_customize_sanitize_js', array( __CLASS__, 'temp_customize_sanitize_js' ), 10, 2 ); } /** @@ -590,21 +578,6 @@ class WP_Customize_Widgets { return $sanitized_widget_ids; } - /** - * Special filter for Settings Revisions plugin until it can handle - * dynamically creating settings. - * - * @param mixed $value - * @param stdClass|WP_Customize_Setting $setting - * @return mixed - */ - static function temp_customize_sanitize_js( $value, $setting ) { - if ( preg_match( '/^widget_/', $setting->id ) && $setting->type === 'option' ) { - $value = self::sanitize_widget_js_instance( $value ); - } - return $value; - } - /** * Build up an index of all available widgets for use in Backbone models *