Make WordPress Core

Ticket #34024: 34024.patch

File 34024.patch, 2.2 KB (added by leemon, 9 years ago)

Improve method documentation

  • src/wp-includes/widgets/class-wp-widget-rss.php

     
    1616 */
    1717class WP_Widget_RSS extends WP_Widget {
    1818
     19        /**
     20         * PHP5 constructor.
     21         *
     22         * @since 2.8.0
     23         * @access public
     24         */
    1925        public function __construct() {
    2026                $widget_ops = array( 'description' => __('Entries from any RSS or Atom feed.') );
    2127                $control_ops = array( 'width' => 400, 'height' => 200 );
     
    2329        }
    2430
    2531        /**
    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.
    2840         */
    2941        public function widget( $args, $instance ) {
    3042                if ( isset($instance['error']) && $instance['error'] )
     
    7991        }
    8092
    8193        /**
    82          * @param array $new_instance
    83          * @param array $old_instance
    84          * @return array
     94         * Updates a particular instance of a widget.
     95         *
     96         * This function should check that `$new_instance` is set correctly. The newly-calculated
     97         * value of `$instance` should be returned. If false is returned, the instance won't be
     98         * saved/updated.
     99         *
     100         * @since 2.8.0
     101         * @access public
     102         *
     103         * @param array $new_instance New settings for this instance as input by the user via
     104         *                            WP_Widget::form().
     105         * @param array $old_instance Old settings for this instance.
     106         * @return array Settings to save or bool false to cancel saving.
    85107         */
    86108        public function update( $new_instance, $old_instance ) {
    87109                $testurl = ( isset( $new_instance['url'] ) && ( !isset( $old_instance['url'] ) || ( $new_instance['url'] != $old_instance['url'] ) ) );
     
    89111        }
    90112
    91113        /**
    92          * @param array $instance
     114         * Outputs the settings update form.
     115         *
     116         * @since 2.8.0
     117         * @access public
     118         *
     119         * @param array $instance Current settings.
    93120         */
    94121        public function form( $instance ) {
    95122                if ( empty( $instance ) ) {