Make WordPress Core

Ticket #34027: 34027.patch

File 34027.patch, 1.7 KB (added by leemon, 9 years ago)

Improve method documentation

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

     
    1616 */
    1717class WP_Widget_Text 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_text', 'description' => __('Arbitrary text or HTML.'));
    2127                $control_ops = array('width' => 400, 'height' => 350);
     
    6167        }
    6268
    6369        /**
    64          * @param array $new_instance
    65          * @param array $old_instance
    66          * @return array
     70         * Updates a particular instance of a widget.
     71         *
     72         * This function should check that `$new_instance` is set correctly. The newly-calculated
     73         * value of `$instance` should be returned. If false is returned, the instance won't be
     74         * saved/updated.
     75         *
     76         * @since 2.8.0
     77         * @access public
     78         *
     79         * @param array $new_instance New settings for this instance as input by the user via
     80         *                            WP_Widget::form().
     81         * @param array $old_instance Old settings for this instance.
     82         * @return array Settings to save or bool false to cancel saving.
    6783         */
    6884        public function update( $new_instance, $old_instance ) {
    6985                $instance = $old_instance;
     
    7793        }
    7894
    7995        /**
    80          * @param array $instance
     96         * Outputs the settings update form.
     97         *
     98         * @since 2.8.0
     99         * @access public
     100         *
     101         * @param array $instance Current settings.
    81102         */
    82103        public function form( $instance ) {
    83104                $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '' ) );