WordPress 4.5
[autoinstalls/wordpress.git] / wp-includes / widgets / class-wp-nav-menu-widget.php
index 22ec8610763ad05a8bcb0f9552c8edf9e32382a7..d465525913749874455b689278b28fd34853ca53 100644 (file)
         * @access public
         */
        public function __construct() {
-               $widget_ops = array( 'description' => __('Add a custom menu to your sidebar.') );
+               $widget_ops = array(
+                       'description' => __( 'Add a custom menu to your sidebar.' ),
+                       'customize_selective_refresh' => true,
+               );
                parent::__construct( 'nav_menu', __('Custom Menu'), $widget_ops );
        }
 
@@ -92,7 +95,7 @@
        public function update( $new_instance, $old_instance ) {
                $instance = array();
                if ( ! empty( $new_instance['title'] ) ) {
-                       $instance['title'] = sanitize_text_field( stripslashes( $new_instance['title'] ) );
+                       $instance['title'] = sanitize_text_field( $new_instance['title'] );
                }
                if ( ! empty( $new_instance['nav_menu'] ) ) {
                        $instance['nav_menu'] = (int) $new_instance['nav_menu'];