Changeset 34613
- Timestamp:
- 09/27/2015 12:45:42 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-recent-posts.php
r34514 r34613 9 9 10 10 /** 11 * Core class used to implement a Recent _Posts widget.11 * Core class used to implement a Recent Posts widget. 12 12 * 13 13 * @since 2.8.0 … … 17 17 class WP_Widget_Recent_Posts extends WP_Widget { 18 18 19 /** 20 * Sets up a new Recent Posts widget instance. 21 * 22 * @since 2.8.0 23 * @access public 24 */ 19 25 public function __construct() { 20 26 $widget_ops = array('classname' => 'widget_recent_entries', 'description' => __( "Your site’s most recent Posts.") ); … … 24 30 25 31 /** 26 * @param array $args 27 * @param array $instance 32 * Outputs the content for the current Recent Posts widget instance. 33 * 34 * @since 2.8.0 35 * @access public 36 * 37 * @param array $args Display arguments including 'before_title', 'after_title', 38 * 'before_widget', and 'after_widget'. 39 * @param array $instance Settings for the current Recent Posts widget instance. 28 40 */ 29 41 public function widget( $args, $instance ) { … … 59 71 60 72 if ($r->have_posts()) : 61 ?>73 ?> 62 74 <?php echo $args['before_widget']; ?> 63 75 <?php if ( $title ) { … … 75 87 </ul> 76 88 <?php echo $args['after_widget']; ?> 77 <?php89 <?php 78 90 // Reset the global $the_post as this query will have stomped on it 79 91 wp_reset_postdata(); … … 83 95 84 96 /** 85 * @param array $new_instance 86 * @param array $old_instance 87 * @return array 97 * Handles updating the settings for the current Recent Posts widget instance. 98 * 99 * @since 2.8.0 100 * @access public 101 * 102 * @param array $new_instance New settings for this instance as input by the user via 103 * WP_Widget::form(). 104 * @param array $old_instance Old settings for this instance. 105 * @return array Updated settings to save. 88 106 */ 89 107 public function update( $new_instance, $old_instance ) { … … 96 114 97 115 /** 98 * @param array $instance 116 * Outputs the settings form for the Recent Posts widget. 117 * 118 * @since 2.8.0 119 * @access public 120 * 121 * @param array $instance Current settings. 99 122 */ 100 123 public function form( $instance ) {
Note: See TracChangeset
for help on using the changeset viewer.