Changeset 11274
- Timestamp:
- 05/11/2009 07:48:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-widgets.php
r11254 r11274 180 180 function widget( $args, $instance ) { 181 181 extract($args); 182 $title = apply_filters('widget_title', $instance['title']); 183 182 184 echo $before_widget; 185 if ( $title ) 186 echo $before_title . $title . $after_title; 183 187 184 188 // Use current theme search form if it exists … … 187 191 echo $after_widget; 188 192 } 193 194 function form( $instance ) { 195 $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); 196 $title = $instance['title']; 197 ?> 198 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p> 199 <?php 200 } 201 202 function update( $new_instance, $old_instance ) { 203 $instance = $old_instance; 204 $new_instance = wp_parse_args((array) $new_instance, array( 'title' => '')); 205 $instance['title'] = strip_tags($new_instance['title']); 206 return $instance; 207 } 208 189 209 } 190 210
Note: See TracChangeset
for help on using the changeset viewer.