WordPress.org

Make WordPress Core

Changeset 49790


Ignore:
Timestamp:
12/10/2020 11:57:29 PM (11 months ago)
Author:
johnbillion
Message:

Docs: Various docblock improvements.

See #51800

Location:
trunk/src/wp-includes
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-post-type.php

    r49789 r49790  
    4141     *
    4242     * @since 4.6.0
    43      * @var object $labels
     43     * @var stdClass $labels
    4444     */
    4545    public $labels;
     
    159159
    160160    /**
    161      * The URL to the icon to be used for this menu.
     161     * The URL or reference to the icon to be used for this menu.
    162162     *
    163163     * Pass a base64-encoded SVG using a data URI, which will be colored to match the color scheme.
     
    318318     *
    319319     * @since 4.6.0
    320      * @var object $cap
     320     * @var stdClass $cap
    321321     */
    322322    public $cap;
     
    381381    /**
    382382     * Constructor.
     383     *
     384     * See the register_post_type() function for accepted arguments for `$args`.
    383385     *
    384386     * Will populate object properties from the provided arguments and assign other
     
    401403    /**
    402404     * Sets post type properties.
     405     *
     406     * See the register_post_type() function for accepted arguments for `$args`.
    403407     *
    404408     * @since 4.6.0
     
    415419         *
    416420         * @param array  $args      Array of arguments for registering a post type.
     421         *                          See the register_post_type() function for accepted arguments.
    417422         * @param string $post_type Post type key.
    418423         */
  • trunk/src/wp-includes/class-wp-taxonomy.php

    r49451 r49790  
    3939     *
    4040     * @since 4.7.0
    41      * @var object
     41     * @var stdClass
    4242     */
    4343    public $labels;
     
    153153     *
    154154     * @since 4.7.0
    155      * @var object
     155     * @var stdClass
    156156     */
    157157    public $cap;
     
    239239    /**
    240240     * Constructor.
     241     *
     242     * See the register_taxonomy() function for accepted arguments for `$args`.
    241243     *
    242244     * @since 4.7.0
     
    257259    /**
    258260     * Sets taxonomy properties.
     261     *
     262     * See the register_taxonomy() function for accepted arguments for `$args`.
    259263     *
    260264     * @since 4.7.0
     
    272276         *
    273277         * @param array    $args        Array of arguments for registering a taxonomy.
     278         *                              See the register_taxonomy() function for accepted arguments.
    274279         * @param string   $taxonomy    Taxonomy key.
    275280         * @param string[] $object_type Array of names of object types for the taxonomy.
  • trunk/src/wp-includes/class-wp-user.php

    r49108 r49790  
    4141     *
    4242     * @since 2.0.0
    43      * @var object
     43     * @var stdClass
    4444     */
    4545    public $data;
  • trunk/src/wp-includes/functions.php

    r49744 r49790  
    11791179 * @since 4.4.0
    11801180 *
    1181  * @return string[] An array of parameters to remove from the URL.
     1181 * @return string[] An array of query variable names to remove from the URL.
    11821182 */
    11831183function wp_removable_query_args() {
     
    12141214
    12151215    /**
    1216      * Filters the list of query variables to remove.
     1216     * Filters the list of query variable names to remove.
    12171217     *
    12181218     * @since 4.2.0
    12191219     *
    1220      * @param string[] $removable_query_args An array of query variables to remove from a URL.
     1220     * @param string[] $removable_query_args An array of query variable names to remove from a URL.
    12211221     */
    12221222    return apply_filters( 'removable_query_args', $removable_query_args );
  • trunk/src/wp-includes/pomo/plural-forms.php

    r48769 r49790  
    9191         *
    9292         * @since 4.9.0
     93         *
     94         * @throws Exception If there is a syntax or parsing error with the string.
    9395         *
    9496         * @param string $str String to parse.
     
    250252         *
    251253         * @since 4.9.0
     254         *
     255         * @throws Exception If the plural form value cannot be calculated.
    252256         *
    253257         * @param int $n Variable "n" to substitute.
  • trunk/src/wp-includes/post.php

    r49789 r49790  
    55095509 *                                      Default 'publish'.
    55105510 * }
    5511  * @return array|false Array of pages matching defaults or `$args`.
     5511 * @return WP_Post[]|int[]|false Array of pages (or hierarchical post type items). Boolean false if the
     5512 *                               specified post type is not hierarchical or the specified status is not
     5513 *                               supported by the post type.
    55125514 */
    55135515function get_pages( $args = array() ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r49731 r49790  
    267267
    268268        /**
    269          * Filters the query arguments for a request.
     269         * Filters WP_Query arguments when querying users via the REST API.
     270         *
     271         * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
     272         *
     273         * Possible filter names include:
     274         *
     275         *  - `rest_post_query`
     276         *  - `rest_page_query`
     277         *  - `rest_attachment_query`
    270278         *
    271279         * Enables adding extra arguments or setting defaults for a post collection request.
     
    275283         * @link https://developer.wordpress.org/reference/classes/wp_query/
    276284         *
    277          * @param array           $args    Key value array of query var to query value.
    278          * @param WP_REST_Request $request The request used.
     285         * @param array           $args    Array of arguments to be passed to WP_Query.
     286         * @param WP_REST_Request $request The REST API request.
    279287         */
    280288        $args       = apply_filters( "rest_{$this->post_type}_query", $args, $request );
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r49610 r49790  
    234234
    235235        /**
    236          * Filters the query arguments before passing them to get_terms().
     236         * Filters get_terms() arguments when querying users via the REST API.
    237237         *
    238238         * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
     
    247247         * @param array           $prepared_args Array of arguments to be
    248248         *                                       passed to get_terms().
    249          * @param WP_REST_Request $request       The current request.
     249         * @param WP_REST_Request $request       The REST API request.
    250250         */
    251251        $prepared_args = apply_filters( "rest_{$this->taxonomy}_query", $prepared_args, $request );
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r49120 r49790  
    313313         *
    314314         * @param array           $prepared_args Array of arguments for WP_User_Query.
    315          * @param WP_REST_Request $request       The current request.
     315         * @param WP_REST_Request $request       The REST API request.
    316316         */
    317317        $prepared_args = apply_filters( 'rest_user_query', $prepared_args, $request );
  • trunk/src/wp-includes/taxonomy.php

    r49789 r49790  
    21962196 *     @type string $slug        The term slug to use. Default empty string.
    21972197 * }
    2198  * @return array|WP_Error An array containing the `term_id` and `term_taxonomy_id`,
    2199  *                        WP_Error otherwise.
     2198 * @return array|WP_Error {
     2199 *     An array of the new term data, WP_Error otherwise.
     2200 *
     2201 *     @type int        $term_id          The new term ID.
     2202 *     @type int|string $term_taxonomy_id The new term taxonomy ID. Can be a numeric string.
     2203 * }
    22002204 */
    22012205function wp_insert_term( $term, $taxonomy, $args = array() ) {
     
    37433747 * @global wpdb $wpdb WordPress database abstraction object.
    37443748 *
    3745  * @param array $terms    List of term objects (passed by reference).
    3746  * @param string $taxonomy Term context.
     3749 * @param object[]|WP_Term[] $terms    List of term objects (passed by reference).
     3750 * @param string             $taxonomy Term context.
    37473751 */
    37483752function _pad_term_counts( &$terms, $taxonomy ) {
  • trunk/src/wp-includes/widgets.php

    r49561 r49790  
    803803         * @since 3.0.0
    804804         *
    805          * @param array $widget_id {
     805         * @param array $widget {
    806806         *     An associative array of widget arguments.
    807807         *
    808808         *     @type string   $name        Name of the widget.
    809809         *     @type string   $id          Widget ID.
    810          *     @type callable $callback    When the hook is fired on the front end, $callback is an array
    811          *                                 containing the widget object. Fired on the back end, $callback
    812          *                                 is 'wp_widget_control', see $_callback.
     810         *     @type callable $callback    When the hook is fired on the front end, `$callback` is an array
     811         *                                 containing the widget object. Fired on the back end, `$callback`
     812         *                                 is 'wp_widget_control', see `$_callback`.
    813813         *     @type array    $params      An associative array of multi-widget arguments.
    814814         *     @type string   $classname   CSS class applied to the widget container.
    815815         *     @type string   $description The widget description.
    816          *     @type array    $_callback   When the hook is fired on the back end, $_callback is populated
    817          *                                 with an array containing the widget object, see $callback.
     816         *     @type array    $_callback   When the hook is fired on the back end, `$_callback` is populated
     817         *                                 with an array containing the widget object, see `$callback`.
    818818         * }
    819819         */
Note: See TracChangeset for help on using the changeset viewer.