]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/widgets/class-wp-widget-tag-cloud.php
WordPress 4.7
[autoinstalls/wordpress.git] / wp-includes / widgets / class-wp-widget-tag-cloud.php
index 99f7af6ea1be04b31dbb49d5892f605435f4b603..b4adabd0394c942784939d1d27bb8b847fdff64b 100644 (file)
@@ -23,8 +23,11 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
         * @access public
         */
        public function __construct() {
-               $widget_ops = array( 'description' => __( "A cloud of your most used tags.") );
-               parent::__construct('tag_cloud', __('Tag Cloud'), $widget_ops);
+               $widget_ops = array(
+                       'description' => __( 'A cloud of your most used tags.' ),
+                       'customize_selective_refresh' => true,
+               );
+               parent::__construct( 'tag_cloud', __( 'Tag Cloud' ), $widget_ops );
        }
 
        /**
@@ -51,14 +54,14 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
                }
 
                /**
-                * Filter the taxonomy used in the Tag Cloud widget.
+                * Filters the taxonomy used in the Tag Cloud widget.
                 *
                 * @since 2.8.0
                 * @since 3.0.0 Added taxonomy drop-down.
                 *
                 * @see wp_tag_cloud()
                 *
-                * @param array $current_taxonomy The taxonomy to use in the tag cloud. Default 'tags'.
+                * @param array $args Args used for the tag cloud widget.
                 */
                $tag_cloud = wp_tag_cloud( apply_filters( 'widget_tag_cloud_args', array(
                        'taxonomy' => $current_taxonomy,
@@ -98,7 +101,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
         */
        public function update( $new_instance, $old_instance ) {
                $instance = array();
-               $instance['title'] = sanitize_text_field( stripslashes( $new_instance['title'] ) );
+               $instance['title'] = sanitize_text_field( $new_instance['title'] );
                $instance['taxonomy'] = stripslashes($new_instance['taxonomy']);
                return $instance;
        }