Ticket #34022: 34022.patch
File 34022.patch, 2.5 KB (added by , 9 years ago) |
---|
-
src/wp-includes/widgets/class-wp-widget-recent-comments.php
16 16 */ 17 17 class WP_Widget_Recent_Comments 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_comments', 'description' => __( 'Your site’s most recent comments.' ) ); 21 27 parent::__construct('recent-comments', __('Recent Comments'), $widget_ops); … … 25 31 add_action( 'wp_head', array($this, 'recent_comments_style') ); 26 32 } 27 33 28 /** 34 /** 35 * Outputs the Recent Comments default widget styles. 36 * 37 * @since 3.1.0 29 38 * @access public 30 39 */ 31 40 public function recent_comments_style() { … … 46 55 } 47 56 48 57 /** 49 * @param array $args 50 * @param array $instance 58 * Echoes the widget content. 59 * 60 * @since 2.8.0 61 * @access public 62 * 63 * @param array $args Display arguments including 'before_title', 'after_title', 64 * 'before_widget', and 'after_widget'. 65 * @param array $instance The settings for the particular instance of the widget. 51 66 */ 52 67 public function widget( $args, $instance ) { 53 68 if ( ! isset( $args['widget_id'] ) ) … … 107 122 } 108 123 109 124 /** 110 * @param array $new_instance 111 * @param array $old_instance 112 * @return array 125 * Updates a particular instance of a widget. 126 * 127 * This function should check that `$new_instance` is set correctly. The newly-calculated 128 * value of `$instance` should be returned. If false is returned, the instance won't be 129 * saved/updated. 130 * 131 * @since 2.8.0 132 * @access public 133 * 134 * @param array $new_instance New settings for this instance as input by the user via 135 * WP_Widget::form(). 136 * @param array $old_instance Old settings for this instance. 137 * @return array Settings to save or bool false to cancel saving. 113 138 */ 114 139 public function update( $new_instance, $old_instance ) { 115 140 $instance = $old_instance; … … 119 144 } 120 145 121 146 /** 122 * @param array $instance 147 * Outputs the settings update form. 148 * 149 * @since 2.8.0 150 * @access public 151 * 152 * @param array $instance Current settings. 123 153 */ 124 154 public function form( $instance ) { 125 155 $title = isset( $instance['title'] ) ? $instance['title'] : '';