Ticket #34023: 34023.patch
File 34023.patch, 2.2 KB (added by , 9 years ago) |
---|
-
src/wp-includes/widgets/class-wp-widget-recent-posts.php
16 16 */ 17 17 class WP_Widget_Recent_Posts extends WP_Widget { 18 18 19 /** 20 * PHP5 constructor. 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.") ); 21 27 parent::__construct('recent-posts', __('Recent Posts'), $widget_ops); … … 23 29 } 24 30 25 31 /** 26 * @param array $args 27 * @param array $instance 32 * Echoes the widget content. 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 The settings for the particular instance of the widget. 28 40 */ 29 41 public function widget( $args, $instance ) { 30 42 if ( ! isset( $args['widget_id'] ) ) { … … 82 94 } 83 95 84 96 /** 85 * @param array $new_instance 86 * @param array $old_instance 87 * @return array 97 * Updates a particular instance of a widget. 98 * 99 * This function should check that `$new_instance` is set correctly. The newly-calculated 100 * value of `$instance` should be returned. If false is returned, the instance won't be 101 * saved/updated. 102 * 103 * @since 2.8.0 104 * @access public 105 * 106 * @param array $new_instance New settings for this instance as input by the user via 107 * WP_Widget::form(). 108 * @param array $old_instance Old settings for this instance. 109 * @return array Settings to save or bool false to cancel saving. 88 110 */ 89 111 public function update( $new_instance, $old_instance ) { 90 112 $instance = $old_instance; … … 95 117 } 96 118 97 119 /** 98 * @param array $instance 120 * Outputs the settings update form. 121 * 122 * @since 2.8.0 123 * @access public 124 * 125 * @param array $instance Current settings. 99 126 */ 100 127 public function form( $instance ) { 101 128 $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';