Make WordPress Core

Ticket #34025: 34025.patch

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

Improve method documentation

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

     
    1616 */
    1717class WP_Widget_Search 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('classname' => 'widget_search', 'description' => __( "A search form for your site.") );
    2127                parent::__construct( 'search', _x( 'Search', 'Search widget' ), $widget_ops );
     
    2228        }
    2329
    2430        /**
    25          * @param array $args
    26          * @param array $instance
     31         * Echoes the widget content.
     32         *
     33         * @since 2.8.0
     34         * @access public
     35         *
     36         * @param array $args     Display arguments including 'before_title', 'after_title',
     37         *                        'before_widget', and 'after_widget'.
     38         * @param array $instance The settings for the particular instance of the widget.
    2739         */
    2840        public function widget( $args, $instance ) {
    2941                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
     
    4153        }
    4254
    4355        /**
    44          * @param array $instance
     56         * Outputs the settings update form.
     57         *
     58         * @since 2.8.0
     59         * @access public
     60         *
     61         * @param array $instance Current settings.
    4562         */
    4663        public function form( $instance ) {
    4764                $instance = wp_parse_args( (array) $instance, array( 'title' => '') );
     
    5269        }
    5370
    5471        /**
    55          * @param array $new_instance
    56          * @param array $old_instance
    57          * @return array
     72         * Updates a particular instance of a widget.
     73         *
     74         * This function should check that `$new_instance` is set correctly. The newly-calculated
     75         * value of `$instance` should be returned. If false is returned, the instance won't be
     76         * saved/updated.
     77         *
     78         * @since 2.8.0
     79         * @access public
     80         *
     81         * @param array $new_instance New settings for this instance as input by the user via
     82         *                            WP_Widget::form().
     83         * @param array $old_instance Old settings for this instance.
     84         * @return array Settings to save or bool false to cancel saving.
    5885         */
    5986        public function update( $new_instance, $old_instance ) {
    6087                $instance = $old_instance;