Changeset 10800
- Timestamp:
- 03/17/2009 02:41:28 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/default-widgets.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-widgets.php
r10799 r10800 295 295 } 296 296 297 /**298 * Display calendar widget.299 *300 * @since 2.2.0301 *302 * @param array $args Widget arguments.303 */304 function wp_widget_calendar($args) {305 extract($args);306 $options = get_option('widget_calendar');307 $title = apply_filters('widget_title', $options['title']);308 if ( empty($title) )309 $title = ' ';310 echo $before_widget . $before_title . $title . $after_title;311 echo '<div id="calendar_wrap">';312 get_calendar();313 echo '</div>';314 echo $after_widget;315 }316 317 /**318 * Display and process calendar widget options form.319 *320 * @since 2.2.0321 */322 function wp_widget_calendar_control() {323 $options = $newoptions = get_option('widget_calendar');324 if ( isset($_POST["calendar-submit"]) ) {325 $newoptions['title'] = strip_tags(stripslashes($_POST["calendar-title"]));326 }327 if ( $options != $newoptions ) {328 $options = $newoptions;329 update_option('widget_calendar', $options);330 }331 $title = attribute_escape($options['title']);332 ?>333 <p><label for="calendar-title"><?php _e('Title:'); ?> <input class="widefat" id="calendar-title" name="calendar-title" type="text" value="<?php echo $title; ?>" /></label></p>334 <input type="hidden" id="calendar-submit" name="calendar-submit" value="1" />335 <?php336 }337 297 338 298 /**
Note: See TracChangeset
for help on using the changeset viewer.