Make WordPress Core

Changeset 58212

Timestamp:
05/27/2024 04:28:00 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for a few functions accepting a WP_Post object.

Follow-up to [15777], [23769], [24490], [25697], [37252], [49544].

See #60699.

Location:
trunk/src
Files:
4 edited

Legend:

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

    r58174 r58212  
    11401140 * @access private
    11411141 *
    1142  * @param int|object $post Post ID or post object.
     1142 * @param int|t $post Post ID or post object.
    11431143 * @return void|int|WP_Error Void if nothing fixed. 0 or WP_Error on update failure. The post ID on update success.
    11441144 */
  • trunk/src/wp-includes/link-template.php

    r57867 r58212  
    466466 * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
    467467 *
    468  * @param int|object $post      Optional. Post ID or object. Default uses the global `$post`.
    469  * @param bool       $leavename Optional. Whether to keep the page name. Default false.
     468 * @param int|t $post      Optional. Post ID or object. Default uses the global `$post`.
     469 * @param bool       $leavename Optional. Whether to keep the page name. Default false.
    470470 * @return string The attachment permalink.
    471471 */
  • trunk/src/wp-includes/post-formats.php

    r55398 r58212  
    6464 * @since 3.1.0
    6565 *
    66  * @param int|object $post   The post for which to assign a format.
    67  * @param string     $format A format to assign. Use an empty string or array to remove all formats from the post.
     66 * @param int|t $post   The post for which to assign a format.
     67 * @param string     $format A format to assign. Use an empty string or array to remove all formats from the post.
    6868 * @return array|WP_Error|false Array of affected term IDs on success. WP_Error on error.
    6969 */
  • trunk/src/wp-includes/post-template.php

    r56424 r58212  
    18621862 * @since 2.6.0
    18631863 *
    1864  * @param int|object $revision Revision ID or revision object.
    1865  * @param bool       $link     Optional. Whether to link to revision's page. Default true.
     1864 * @param int|t $revision Revision ID or revision object.
     1865 * @param bool       $link     Optional. Whether to link to revision's page. Default true.
    18661866 * @return string|false i18n formatted datetimestamp or localized 'Current Revision'.
    18671867 */
     
    19041904 * @since 3.6.0
    19051905 *
    1906  * @param int|object $revision Revision ID or revision object.
    1907  * @param bool       $link     Optional. Whether to link to revision's page. Default true.
     1906 * @param int|t $revision Revision ID or revision object.
     1907 * @param bool       $link     Optional. Whether to link to revision's page. Default true.
    19081908 * @return string|false gravatar, user, i18n formatted datetimestamp or localized 'Current Revision'.
    19091909 */
Note: See TracChangeset for help on using the changeset viewer.