WordPress.org

Make WordPress Core

Changeset 51430


Ignore:
Timestamp:
07/14/2021 08:12:24 AM (5 months ago)
Author:
SergeyBiryukov
Message:

Docs: Synchronize the $post_id argument description for some post and attachment functions.

See #53399.

File:
1 edited

Legend:

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

    r51425 r51430  
    808808 * @global WP_Post $post Global post object.
    809809 *
    810  * @param int|WP_Post|null $post   Optional. Post ID or post object. `null`, `false`, `0` and other PHP falsey
    811  *                                 values return the current global post inside the loop. A numerically valid post
    812  *                                 ID that points to a non-existent post returns `null`. Defaults to global $post.
     810 * @param int|WP_Post|null $post   Optional. Post ID or post object. `null`, `false`, `0` and other PHP falsey values
     811 *                                 return the current global post inside the loop. A numerically valid post ID that
     812 *                                 points to a non-existent post returns `null`. Defaults to global $post.
    813813 * @param string           $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which
    814814 *                                 correspond to a WP_Post object, an associative array, or a numeric array,
     
    21762176 *
    21772177 * @param array $args {
    2178  *     Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all
    2179  *     available arguments.
     2178 *     Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all available arguments.
    21802179 *
    21812180 *     @type int        $numberposts      Total number of posts to retrieve. Is an alias of `$posts_per_page`
     
    23892388 * @since 1.2.0
    23902389 *
    2391  * @param int $post_id Optional. Post ID. Default is ID of the global $post.
     2390 * @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
    23922391 * @return array Post meta for the given post.
    23932392 */
     
    24082407 * @since 1.2.0
    24092408 *
    2410  * @param int $post_id Optional. Post ID. Default is ID of the global $post.
     2409 * @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
    24112410 * @return array|void Array of the keys, if retrieved.
    24122411 */
     
    24332432 *
    24342433 * @param string $key     Optional. Meta field key. Default empty.
    2435  * @param int    $post_id Optional. Post ID. Default is ID of the global $post.
     2434 * @param int    $post_id Optional. Post ID. Default is the ID of the global `$post`.
    24362435 * @return array|null Meta field values.
    24372436 */
     
    24582457 * @since 2.7.0
    24592458 *
    2460  * @param int $post_id Optional. Post ID. Default is ID of the global $post.
     2459 * @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
    24612460 * @return bool Whether post is sticky.
    24622461 */
     
    33413340 * @see wp_delete_post()
    33423341 *
    3343  * @param int $post_id Optional. Post ID. Default is ID of the global $post
    3344  *                     if EMPTY_TRASH_DAYS equals true.
     3342 * @param int $post_id Optional. Post ID. Default is the ID of the global `$post`
     3343 *                     if `EMPTY_TRASH_DAYS` equals true.
    33453344 * @return WP_Post|false|null Post data on success, false or null on failure.
    33463345 */
     
    34183417 *              attachments which are returned to their original 'inherit' status.
    34193418 *
    3420  * @param int $post_id Optional. Post ID. Default is ID of the global `$post`.
     3419 * @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
    34213420 * @return WP_Post|false|null Post data on success, false or null on failure.
    34223421 */
     
    64966495 * @since 2.1.0
    64976496 *
    6498  * @param int $post_id Optional. Attachment ID. Default 0.
     6497 * @param int $post_id Optional. Attachment ID. Default is the ID of the global `$post`.
    64996498 * @return string|false Thumbnail file path on success, false on failure.
    65006499 */
     
    65366535 * @since 2.1.0
    65376536 *
    6538  * @param int $post_id Optional. Attachment ID. Default 0.
     6537 * @param int $post_id Optional. Attachment ID. Default is the ID of the global `$post`.
    65396538 * @return string|false Thumbnail URL on success, false on failure.
    65406539 */
     
    74007399 * @access private
    74017400 *
    7402  * @param int $post_id The ID in the database table of the post being published.
     7401 * @param int $post_id The ID of the post being published.
    74037402 */
    74047403function _publish_post_hook( $post_id ) {
     
    76557654 * @access private
    76567655 *
    7657  * @param string $post_name Slug.
     7656 * @param string $post_name Post slug.
    76587657 * @param int    $post_ID   Optional. Post ID that should be ignored. Default 0.
    76597658 */
Note: See TracChangeset for help on using the changeset viewer.