WordPress.org

Make WordPress Core

Changeset 52249


Ignore:
Timestamp:
11/25/2021 08:37:34 PM (9 days ago)
Author:
audrasjb
Message:

Docs: Miscellaneous DocBlock corrections in wp-admin/includes/post.php.

See #53399.

File:
1 edited

Legend:

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

    r52145 r52249  
    88
    99/**
    10  * Rename $_POST data from form names to DB post columns.
     10 * Renames $_POST data from form names to DB post columns.
    1111 *
    1212 * Manipulates $_POST directly.
     
    1414 * @since 2.6.0
    1515 *
    16  * @param bool  $update    Are we updating a pre-existing post?
     16 * @param bool  $update    Whether the post already exists.
    1717 * @param array $post_data Array of post data. Defaults to the contents of $_POST.
    1818 * @return array|WP_Error Array of post data on success, WP_Error on failure.
     
    205205
    206206/**
    207  * Returns only allowed post data fields
     207 * Returns only allowed post data fields.
    208208 *
    209209 * @since 5.0.1
     
    226226
    227227/**
    228  * Update an existing post with values provided in $_POST.
     228 * Updates an existing post with values provided in $_POST.
    229229 *
    230230 * If post data is passed as an argument, it is treated as an array of data
     
    453453
    454454/**
    455  * Process the post data for the bulk editing of posts.
     455 * Processes the post data for the bulk editing of posts.
    456456 *
    457457 * Updates all bulk edited posts/pages, adding (but not removing) tags and
     
    462462 * @global wpdb $wpdb WordPress database abstraction object.
    463463 *
    464  * @param array $post_data Optional, the array of post data to process if not provided will use $_POST superglobal.
     464 * @param array $post_data Optional. The array of post data to process if not provided will use $_POST superglobal.
    465465 * @return array
    466466 */
     
    662662
    663663/**
    664  * Default post information to use when populating the "Write Post" form.
     664 * Returns default post information to use when populating the "Write Post" form.
    665665 *
    666666 * @since 2.0.0
     
    771771 *
    772772 * @param string $title   Post title.
    773  * @param string $content Optional post content.
    774  * @param string $date    Optional post date.
    775  * @param string $type    Optional post type.
    776  * @param string $status  Optional post status.
     773 * @param string $content Optional. Post content.
     774 * @param string $date    Optional. Post date.
     775 * @param string $type    Optional. Post type.
     776 * @param string $status  Optional. Post status.
    777777 * @return int Post ID if post exists, 0 otherwise.
    778778 */
     
    920920
    921921/**
    922  * Add post meta data defined in $_POST superglobal for post with given ID.
     922 * Adds post meta data defined in $_POST superglobal for post with given ID.
    923923 *
    924924 * @since 1.2.0
     
    963963
    964964/**
    965  * Delete post meta data by meta ID.
     965 * Deletes post meta data by meta ID.
    966966 *
    967967 * @since 1.2.0
     
    975975
    976976/**
    977  * Get a list of previously defined keys.
     977 * Returns a list of previously defined keys.
    978978 *
    979979 * @since 1.2.0
     
    998998
    999999/**
    1000  * Get post meta data by meta ID.
     1000 * Returns post meta data by meta ID.
    10011001 *
    10021002 * @since 2.1.0
     
    10101010
    10111011/**
    1012  * Get meta data for the given post ID.
     1012 * Returns meta data for the given post ID.
    10131013 *
    10141014 * @since 1.2.0
     
    10451045
    10461046/**
    1047  * Update post meta data by meta ID.
     1047 * Updates post meta data by meta ID.
    10481048 *
    10491049 * @since 1.2.0
    10501050 *
    10511051 * @param int    $meta_id
    1052  * @param string $meta_key Expect Slashed
    1053  * @param string $meta_value Expect Slashed
     1052 * @param string $meta_key   Expect Slashed.
     1053 * @param string $meta_value Expect Slashed.
    10541054 * @return bool
    10551055 */
     
    11231123
    11241124/**
    1125  * Get all the possible statuses for a post_type
     1125 * Returns all the possible statuses for a post_type.
    11261126 *
    11271127 * @since 2.5.0
     
    11371137
    11381138/**
    1139  * Run the wp query to fetch the posts for listing on the edit posts page
     1139 * Runs the wp query to fetch the posts for listing on the edit posts page
    11401140 *
    11411141 * @since 2.5.0
     
    12381238
    12391239/**
    1240  * Get the query variables for the current attachments request.
     1240 * Returns the query variables for the current attachments request.
    12411241 *
    12421242 * @since 4.2.0
     
    13601360
    13611361/**
    1362  * Get a sample permalink based off of the post name.
     1362 * Returns a sample permalink based on the post name.
    13631363 *
    13641364 * @since 2.5.0
     
    14421442     *     @type string $1 The post name.
    14431443     * }
    1444      * @param int     $post_id   Post ID.
    1445      * @param string  $title     Post title.
    1446      * @param string  $name      Post name (slug).
    1447      * @param WP_Post $post      Post object.
     1444     * @param int     $post_id Post ID.
     1445     * @param string  $title   Post title.
     1446     * @param string  $name    Post name (slug).
     1447     * @param WP_Post $post    Post object.
    14481448     */
    14491449    return apply_filters( 'get_sample_permalink', $permalink, $post->ID, $title, $name, $post );
     
    16101610
    16111611/**
    1612  * Check to see if the post is currently being edited by another user.
     1612 * Determines whether the post is currently being edited by another user.
    16131613 *
    16141614 * @since 2.5.0
     
    16481648
    16491649/**
    1650  * Mark the post as currently being edited by the current user
     1650 * Marks the post as currently being edited by the current user.
    16511651 *
    16521652 * @since 2.5.0
     
    19631963
    19641964/**
    1965  * Save a post submitted with XHR
     1965 * Saves a post submitted with XHR.
    19661966 *
    19671967 * Intended for use with heartbeat and autosave.js
     
    20142014
    20152015/**
    2016  * Redirect to previous page.
     2016 * Redirects to previous page.
    20172017 *
    20182018 * @since 2.7.0
     
    21282128
    21292129/**
    2130  * Return whether the post can be edited in the block editor.
     2130 * Returns whether the post can be edited in the block editor.
    21312131 *
    21322132 * @since 5.0.0
     
    21622162
    21632163/**
    2164  * Return whether a post type is compatible with the block editor.
     2164 * Returns whether a post type is compatible with the block editor.
    21652165 *
    21662166 * The block editor depends on the REST API, and if the post type is not shown in the
     
    24372437
    24382438    /**
    2439      * Add hidden input fields to the meta box save form.
     2439     * Adds hidden input fields to the meta box save form.
    24402440     *
    24412441     * Hook into this action to print `<input type="hidden" ... />` fields, which will be POSTed back to
     
    24502450
    24512451/**
    2452  * Disable block editor for wp_navigation type posts so they can be managed via the UI.
     2452 * Disables block editor for wp_navigation type posts so they can be managed via the UI.
    24532453 *
    24542454 * @since 5.9.0
Note: See TracChangeset for help on using the changeset viewer.