Make WordPress Core

Changeset 53299


Ignore:
Timestamp:
04/28/2022 09:44:12 AM (20 months ago)
Author:
johnbillion
Message:

Docs: Various docblock improvements.

See #54729

Location:
trunk/src
Files:
12 edited

Legend:

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

    r53084 r53299  
    16621662 *
    16631663 * @param int|WP_Post $post_id ID or object of the post being edited.
    1664  * @return array|false Array of the lock time and user ID. False if the post does not exist, or
    1665  *                     there is no current user.
     1664 * @return array|false {
     1665 *     Array of the lock time and user ID. False if the post does not exist, or there
     1666 *     is no current user.
     1667 *
     1668 *     @type int $0 The current time as a Unix timestamp.
     1669 *     @type int $1 The ID of the current user.
     1670 * }
    16661671 */
    16671672function wp_set_post_lock( $post_id ) {
  • trunk/src/wp-includes/block-editor.php

    r53259 r53299  
    110110 * @param WP_Block_Editor_Context $block_editor_context The current block editor context.
    111111 *
    112  * @return bool|array Array of block type slugs, or boolean to enable/disable all.
     112 * @return bool|string[] Array of block type slugs, or boolean to enable/disable all.
    113113 */
    114114function get_allowed_block_types( $block_editor_context ) {
     
    120120     * @since 5.8.0
    121121     *
    122      * @param bool|array              $allowed_block_types  Array of block type slugs, or boolean to enable/disable all.
     122     * @param bool|string[]           $allowed_block_types  Array of block type slugs, or boolean to enable/disable all.
    123123     *                                                      Default true (all registered block types supported).
    124124     * @param WP_Block_Editor_Context $block_editor_context The current block editor context.
     
    135135         * @deprecated 5.8.0 Use the {@see 'allowed_block_types_all'} filter instead.
    136136         *
    137          * @param bool|array $allowed_block_types Array of block type slugs, or boolean to enable/disable all.
    138          *                                        Default true (all registered block types supported)
    139          * @param WP_Post    $post                The post resource data.
     137         * @param bool|string[] $allowed_block_types Array of block type slugs, or boolean to enable/disable all.
     138         *                                           Default true (all registered block types supported)
     139         * @param WP_Post       $post                The post resource data.
    140140         */
    141141        $allowed_block_types = apply_filters_deprecated( 'allowed_block_types', array( $allowed_block_types, $post ), '5.8.0', 'allowed_block_types_all' );
  • trunk/src/wp-includes/class-wp-block-pattern-categories-registry.php

    r52219 r53299  
    1616     *
    1717     * @since 5.5.0
    18      * @var array
     18     * @var array[]
    1919     */
    2020    private $registered_categories = array();
     
    104104     * @since 5.5.0
    105105     *
    106      * @return array Array of arrays containing the registered pattern categories properties.
     106     * @return array[] Array of arrays containing the registered pattern categories properties.
    107107     */
    108108    public function get_all_registered() {
  • trunk/src/wp-includes/class-wp-block-patterns-registry.php

    r52943 r53299  
    1818     *
    1919     * @since 5.5.0
    20      * @var array
     20     * @var array[]
    2121     */
    2222    private $registered_patterns = array();
     
    146146     * @since 5.5.0
    147147     *
    148      * @return array Array of arrays containing the registered block patterns properties,
    149      *               and per style.
     148     * @return array[] Array of arrays containing the registered block patterns properties,
     149     *                 and per style.
    150150     */
    151151    public function get_all_registered() {
  • trunk/src/wp-includes/class-wp-comment-query.php

    r53291 r53299  
    9494     *
    9595     * @since 4.0.0
    96      * @var array
     96     * @var int[]|WP_Comment[]
    9797     */
    9898    public $comments;
     
    375375     * @global wpdb $wpdb WordPress database abstraction object.
    376376     *
    377      * @return int|array List of comments or number of found comments if `$count` argument is true.
     377     * @return int|int[]|WP_Comment[] List of comments or number of found comments if `$count` argument is true.
    378378     */
    379379    public function get_comments() {
  • trunk/src/wp-includes/class-wp-editor.php

    r52978 r53299  
    17521752     *
    17531753     * @param array $args Optional. Accepts 'pagenum' and 's' (search) arguments.
    1754      * @return array|false Results.
     1754     * @return array|false $results {
     1755     *     An array of associative arrays of query results, false if there are none.
     1756     *
     1757     *     @type array ...$0 {
     1758     *         @type int    $ID        Post ID.
     1759     *         @type string $title     The trimmed, escaped post title.
     1760     *         @type string $permalink Post permalink.
     1761     *         @type string $info      A 'Y/m/d'-formatted date for 'post' post type,
     1762     *                                 the 'singular_name' post type label otherwise.
     1763     *     }
     1764     * }
    17551765     */
    17561766    public static function wp_link_query( $args = array() ) {
  • trunk/src/wp-includes/class-wp-error.php

    r49116 r53299  
    104104     *
    105105     * @param string|int $code Optional. Retrieve messages matching code, if exists.
    106      * @return array Error strings on success, or empty array if there are none.
     106     * @return string[] Error strings on success, or empty array if there are none.
    107107     */
    108108    public function get_error_messages( $code = '' ) {
  • trunk/src/wp-includes/class-wp-term-query.php

    r53280 r53299  
    700700         * @since 3.1.0
    701701         *
    702          * @param string[] $clauses    Array of query SQL clauses.
     702         * @param string[] $clauses {
     703         *     Associative array of the clauses for the query.
     704         *
     705         *     @type string $fields   The SELECT clause of the query.
     706         *     @type string $join     The JOIN clause of the query.
     707         *     @type string $where    The WHERE clause of the query.
     708         *     @type string $distinct The DISTINCT clause of the query.
     709         *     @type string $orderby  The ORDER BY clause of the query.
     710         *     @type string $order    The ORDER clause of the query.
     711         *     @type string $limits   The LIMIT clause of the query.
     712         * }
    703713         * @param string[] $taxonomies An array of taxonomy names.
    704714         * @param array    $args       An array of term query arguments.
  • trunk/src/wp-includes/comment.php

    r53265 r53299  
    157157 * @param int   $post_id The ID of the post.
    158158 * @param array $args    Optional. See WP_Comment_Query::__construct() for information on accepted arguments.
    159  * @return int|array The approved comments, or number of comments if `$count`
    160  *                   argument is true.
     159 * @return WP_Comment[]|int[]|int The approved comments, or number of comments if `$count`
     160 *                                argument is true.
    161161 */
    162162function get_approved_comments( $post_id, $args = array() ) {
     
    238238 * @param string|array $args Optional. Array or string of arguments. See WP_Comment_Query::__construct()
    239239 *                           for information on accepted arguments. Default empty.
    240  * @return int|array List of comments or number of found comments if `$count` argument is true.
     240 * @return WP_Comment[]|int[]|int List of comments or number of found comments if `$count` argument is true.
    241241 */
    242242function get_comments( $args = '' ) {
  • trunk/src/wp-includes/functions.php

    r53243 r53299  
    69196919
    69206920/**
    6921  * Return a comma-separated string of functions that have been called to get
     6921 * Returns a comma-separated string or array of functions that have been called to get
    69226922 * to the current point in code.
    69236923 *
     
    69306930 * @param int    $skip_frames  Optional. A number of stack frames to skip - useful for unwinding
    69316931 *                             back to the source of the issue. Default 0.
    6932  * @param bool   $pretty       Optional. Whether or not you want a comma separated string or raw
    6933  *                             array returned. Default true.
     6932 * @param bool   $pretty       Optional. Whether you want a comma separated string instead of
     6933 *                             the raw array returned. Default true.
    69346934 * @return string|array Either a string containing a reversed comma separated trace or an array
    69356935 *                      of individual calls.
  • trunk/src/wp-includes/pluggable.php

    r52799 r53299  
    128128     * @global wpdb $wpdb WordPress database abstraction object.
    129129     *
    130      * @param array $user_ids User ID numbers list
     130     * @param int[] $user_ids User ID numbers list
    131131     */
    132132    function cache_users( $user_ids ) {
  • trunk/src/wp-includes/wp-db.php

    r53131 r53299  
    18521852     *
    18531853     * @param string $host The DB_HOST setting to parse.
    1854      * @return array|false Array containing the host, the port, the socket and
    1855      *                     whether it is an IPv6 address, in that order.
    1856      *                     False if $host couldn't be parsed.
     1854     * @return array|false {
     1855     *     Array containing the host, the port, the socket and
     1856     *     whether it is an IPv6 address, in that order.
     1857     *     False if the host couldn't be parsed.
     1858     *
     1859     *     @type string      $0 Host name.
     1860     *     @type string|null $1 Port.
     1861     *     @type string|null $2 Socket.
     1862     *     @type bool        $3 Whether it is an IPv6 address.
     1863     * }
    18571864     */
    18581865    public function parse_db_host( $host ) {
     
    30443051     * @param string $table  Table name.
    30453052     * @param string $column Column name.
    3046      * @return array|false|WP_Error array( 'length' => (int), 'type' => 'byte' | 'char' ).
    3047      *                              False if the column has no length (for example, numeric column).
    3048      *                              WP_Error object if there was an error.
     3053     * @return array|false|WP_Error {
     3054     *     Array of column length information, false if the column has no length (for
     3055     *     example, numeric column), WP_Error object if there was an error.
     3056     *
     3057     *     @type int    $length The column length.
     3058     *     @type string $type   One of 'byte' or 'char'.
    30493059     */
    30503060    public function get_col_length( $table, $column ) {
Note: See TracChangeset for help on using the changeset viewer.