mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
Docs: Improve documentation for a few functions accepting a WP_Post
object.
Follow-up to [15777], [23769], [24490], [25697], [37252], [49544]. See #60699. Built from https://develop.svn.wordpress.org/trunk@58212 git-svn-id: http://core.svn.wordpress.org/trunk@57675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b2b6166091
commit
f6973306ea
@ -1139,7 +1139,7 @@ function update_meta( $meta_id, $meta_key, $meta_value ) {
|
|||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
* @access private
|
* @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.
|
* @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 ) {
|
function _fix_attachment_links( $post ) {
|
||||||
|
@ -465,8 +465,8 @@ function _get_page_link( $post = false, $leavename = false, $sample = false ) {
|
|||||||
*
|
*
|
||||||
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
|
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
|
||||||
*
|
*
|
||||||
* @param int|object $post Optional. Post ID or object. Default uses the global `$post`.
|
* @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.
|
* @param bool $leavename Optional. Whether to keep the page name. Default false.
|
||||||
* @return string The attachment permalink.
|
* @return string The attachment permalink.
|
||||||
*/
|
*/
|
||||||
function get_attachment_link( $post = null, $leavename = false ) {
|
function get_attachment_link( $post = null, $leavename = false ) {
|
||||||
|
@ -63,8 +63,8 @@ function has_post_format( $format = array(), $post = null ) {
|
|||||||
*
|
*
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*
|
*
|
||||||
* @param int|object $post The post for which to assign a format.
|
* @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.
|
* @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.
|
* @return array|WP_Error|false Array of affected term IDs on success. WP_Error on error.
|
||||||
*/
|
*/
|
||||||
function set_post_format( $post, $format ) {
|
function set_post_format( $post, $format ) {
|
||||||
|
@ -1861,8 +1861,8 @@ function get_page_template_slug( $post = null ) {
|
|||||||
*
|
*
|
||||||
* @since 2.6.0
|
* @since 2.6.0
|
||||||
*
|
*
|
||||||
* @param int|object $revision Revision ID or revision object.
|
* @param int|WP_Post $revision Revision ID or revision object.
|
||||||
* @param bool $link Optional. Whether to link to revision's page. Default true.
|
* @param bool $link Optional. Whether to link to revision's page. Default true.
|
||||||
* @return string|false i18n formatted datetimestamp or localized 'Current Revision'.
|
* @return string|false i18n formatted datetimestamp or localized 'Current Revision'.
|
||||||
*/
|
*/
|
||||||
function wp_post_revision_title( $revision, $link = true ) {
|
function wp_post_revision_title( $revision, $link = true ) {
|
||||||
@ -1903,8 +1903,8 @@ function wp_post_revision_title( $revision, $link = true ) {
|
|||||||
*
|
*
|
||||||
* @since 3.6.0
|
* @since 3.6.0
|
||||||
*
|
*
|
||||||
* @param int|object $revision Revision ID or revision object.
|
* @param int|WP_Post $revision Revision ID or revision object.
|
||||||
* @param bool $link Optional. Whether to link to revision's page. Default true.
|
* @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'.
|
* @return string|false gravatar, user, i18n formatted datetimestamp or localized 'Current Revision'.
|
||||||
*/
|
*/
|
||||||
function wp_post_revision_title_expanded( $revision, $link = true ) {
|
function wp_post_revision_title_expanded( $revision, $link = true ) {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.6-alpha-58211';
|
$wp_version = '6.6-alpha-58212';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user