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

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

See #60699.

git-svn-id: https://develop.svn.wordpress.org/trunk@58212 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2024-05-27 16:28:00 +00:00
parent 56a12ceea0
commit 74ca651d9e
4 changed files with 9 additions and 9 deletions

View File

@ -1139,7 +1139,7 @@ function update_meta( $meta_id, $meta_key, $meta_value ) {
* @since 2.3.0
* @access private
*
* @param int|object $post Post ID or post object.
* @param int|WP_Post $post Post ID or post object.
* @return void|int|WP_Error Void if nothing fixed. 0 or WP_Error on update failure. The post ID on update success.
*/
function _fix_attachment_links( $post ) {

View File

@ -465,8 +465,8 @@ function _get_page_link( $post = false, $leavename = false, $sample = false ) {
*
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param int|object $post Optional. Post ID or object. Default uses the global `$post`.
* @param bool $leavename Optional. Whether to keep the page name. Default false.
* @param int|WP_Post $post Optional. Post ID or object. Default uses the global `$post`.
* @param bool $leavename Optional. Whether to keep the page name. Default false.
* @return string The attachment permalink.
*/
function get_attachment_link( $post = null, $leavename = false ) {

View File

@ -63,8 +63,8 @@ function has_post_format( $format = array(), $post = null ) {
*
* @since 3.1.0
*
* @param int|object $post The post for which to assign a format.
* @param string $format A format to assign. Use an empty string or array to remove all formats from the post.
* @param int|WP_Post $post The post for which to assign a format.
* @param string $format A format to assign. Use an empty string or array to remove all formats from the post.
* @return array|WP_Error|false Array of affected term IDs on success. WP_Error on error.
*/
function set_post_format( $post, $format ) {

View File

@ -1861,8 +1861,8 @@ function get_page_template_slug( $post = null ) {
*
* @since 2.6.0
*
* @param int|object $revision Revision ID or revision object.
* @param bool $link Optional. Whether to link to revision's page. Default true.
* @param int|WP_Post $revision Revision ID or revision object.
* @param bool $link Optional. Whether to link to revision's page. Default true.
* @return string|false i18n formatted datetimestamp or localized 'Current Revision'.
*/
function wp_post_revision_title( $revision, $link = true ) {
@ -1903,8 +1903,8 @@ function wp_post_revision_title( $revision, $link = true ) {
*
* @since 3.6.0
*
* @param int|object $revision Revision ID or revision object.
* @param bool $link Optional. Whether to link to revision's page. Default true.
* @param int|WP_Post $revision Revision ID or revision object.
* @param bool $link Optional. Whether to link to revision's page. Default true.
* @return string|false gravatar, user, i18n formatted datetimestamp or localized 'Current Revision'.
*/
function wp_post_revision_title_expanded( $revision, $link = true ) {