Make WordPress Core


Ignore:
Timestamp:
09/27/2015 12:57:03 AM (9 years ago)
Author:
DrewAPicture
Message:

Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_Meta.

Props leemon.
Fixes #34020. See #34013.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-meta.php

    r34433 r34616  
    1919class WP_Widget_Meta extends WP_Widget {
    2020
     21    /**
     22     * Sets up a new Meta widget instance.
     23     *
     24     * @since 2.8.0
     25     * @access public
     26     */
    2127    public function __construct() {
    2228        $widget_ops = array('classname' => 'widget_meta', 'description' => __( "Login, RSS, & WordPress.org links.") );
     
    2531
    2632    /**
    27      * @param array $args
    28      * @param array $instance
     33     * Outputs the content for the current Meta widget instance.
     34     *
     35     * @since 2.8.0
     36     * @access public
     37     *
     38     * @param array $args     Display arguments including 'before_title', 'after_title',
     39     *                        'before_widget', and 'after_widget'.
     40     * @param array $instance Settings for the current Meta widget instance.
    2941     */
    3042    public function widget( $args, $instance ) {
     
    3648            echo $args['before_title'] . $title . $args['after_title'];
    3749        }
    38 ?>
     50            ?>
    3951            <ul>
    4052            <?php wp_register(); ?>
     
    4254            <li><a href="<?php echo esc_url( get_bloginfo( 'rss2_url' ) ); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    4355            <li><a href="<?php echo esc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    44 <?php
     56            <?php
    4557            /**
    4658             * Filter the "Powered by WordPress" text in the Meta widget.
     
    5769
    5870            wp_meta();
    59 ?>
     71            ?>
    6072            </ul>
    61 <?php
     73            <?php
    6274        echo $args['after_widget'];
    6375    }
    6476
    6577    /**
    66      * @param array $new_instance
    67      * @param array $old_instance
    68      * @return array
     78     * Handles updating settings for the current Meta widget instance.
     79     *
     80     * @since 2.8.0
     81     * @access public
     82     *
     83     * @param array $new_instance New settings for this instance as input by the user via
     84     *                            WP_Widget::form().
     85     * @param array $old_instance Old settings for this instance.
     86     * @return array Updated settings to save.
    6987     */
    7088    public function update( $new_instance, $old_instance ) {
     
    7694
    7795    /**
    78      * @param array $instance
     96     * Outputs the settings form for the Meta widget.
     97     *
     98     * @since 2.8.0
     99     * @access public
     100     *
     101     * @param array $instance Current settings.
    79102     */
    80103    public function form( $instance ) {
Note: See TracChangeset for help on using the changeset viewer.