Docs: Synchronize the `$post_id` argument description for some post and attachment functions.
See #53399. Built from https://develop.svn.wordpress.org/trunk@51430 git-svn-id: http://core.svn.wordpress.org/trunk@51041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b8c451cdec
commit
a727138559
|
@ -807,9 +807,9 @@ function get_extended( $post ) {
|
|||
*
|
||||
* @global WP_Post $post Global post object.
|
||||
*
|
||||
* @param int|WP_Post|null $post Optional. Post ID or post object. `null`, `false`, `0` and other PHP falsey
|
||||
* values return the current global post inside the loop. A numerically valid post
|
||||
* ID that points to a non-existent post returns `null`. Defaults to global $post.
|
||||
* @param int|WP_Post|null $post Optional. Post ID or post object. `null`, `false`, `0` and other PHP falsey values
|
||||
* return the current global post inside the loop. A numerically valid post ID that
|
||||
* points to a non-existent post returns `null`. Defaults to global $post.
|
||||
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which
|
||||
* correspond to a WP_Post object, an associative array, or a numeric array,
|
||||
* respectively. Default OBJECT.
|
||||
|
@ -2175,8 +2175,7 @@ function is_post_publicly_viewable( $post = null ) {
|
|||
* @see WP_Query::parse_query()
|
||||
*
|
||||
* @param array $args {
|
||||
* Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all
|
||||
* available arguments.
|
||||
* Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all available arguments.
|
||||
*
|
||||
* @type int $numberposts Total number of posts to retrieve. Is an alias of `$posts_per_page`
|
||||
* in WP_Query. Accepts -1 for all. Default 5.
|
||||
|
@ -2388,7 +2387,7 @@ function unregister_post_meta( $post_type, $meta_key ) {
|
|||
*
|
||||
* @since 1.2.0
|
||||
*
|
||||
* @param int $post_id Optional. Post ID. Default is ID of the global $post.
|
||||
* @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
|
||||
* @return array Post meta for the given post.
|
||||
*/
|
||||
function get_post_custom( $post_id = 0 ) {
|
||||
|
@ -2407,7 +2406,7 @@ function get_post_custom( $post_id = 0 ) {
|
|||
*
|
||||
* @since 1.2.0
|
||||
*
|
||||
* @param int $post_id Optional. Post ID. Default is ID of the global $post.
|
||||
* @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
|
||||
* @return array|void Array of the keys, if retrieved.
|
||||
*/
|
||||
function get_post_custom_keys( $post_id = 0 ) {
|
||||
|
@ -2432,7 +2431,7 @@ function get_post_custom_keys( $post_id = 0 ) {
|
|||
* @since 1.2.0
|
||||
*
|
||||
* @param string $key Optional. Meta field key. Default empty.
|
||||
* @param int $post_id Optional. Post ID. Default is ID of the global $post.
|
||||
* @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
|
||||
* @return array|null Meta field values.
|
||||
*/
|
||||
function get_post_custom_values( $key = '', $post_id = 0 ) {
|
||||
|
@ -2457,7 +2456,7 @@ function get_post_custom_values( $key = '', $post_id = 0 ) {
|
|||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param int $post_id Optional. Post ID. Default is ID of the global $post.
|
||||
* @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
|
||||
* @return bool Whether post is sticky.
|
||||
*/
|
||||
function is_sticky( $post_id = 0 ) {
|
||||
|
@ -3340,8 +3339,8 @@ function _reset_front_page_settings_for_post( $post_id ) {
|
|||
*
|
||||
* @see wp_delete_post()
|
||||
*
|
||||
* @param int $post_id Optional. Post ID. Default is ID of the global $post
|
||||
* if EMPTY_TRASH_DAYS equals true.
|
||||
* @param int $post_id Optional. Post ID. Default is the ID of the global `$post`
|
||||
* if `EMPTY_TRASH_DAYS` equals true.
|
||||
* @return WP_Post|false|null Post data on success, false or null on failure.
|
||||
*/
|
||||
function wp_trash_post( $post_id = 0 ) {
|
||||
|
@ -3417,7 +3416,7 @@ function wp_trash_post( $post_id = 0 ) {
|
|||
* @since 5.6.0 An untrashed post is now returned to 'draft' status by default, except for
|
||||
* attachments which are returned to their original 'inherit' status.
|
||||
*
|
||||
* @param int $post_id Optional. Post ID. Default is ID of the global `$post`.
|
||||
* @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
|
||||
* @return WP_Post|false|null Post data on success, false or null on failure.
|
||||
*/
|
||||
function wp_untrash_post( $post_id = 0 ) {
|
||||
|
@ -6495,7 +6494,7 @@ function wp_get_attachment_caption( $post_id = 0 ) {
|
|||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param int $post_id Optional. Attachment ID. Default 0.
|
||||
* @param int $post_id Optional. Attachment ID. Default is the ID of the global `$post`.
|
||||
* @return string|false Thumbnail file path on success, false on failure.
|
||||
*/
|
||||
function wp_get_attachment_thumb_file( $post_id = 0 ) {
|
||||
|
@ -6535,7 +6534,7 @@ function wp_get_attachment_thumb_file( $post_id = 0 ) {
|
|||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param int $post_id Optional. Attachment ID. Default 0.
|
||||
* @param int $post_id Optional. Attachment ID. Default is the ID of the global `$post`.
|
||||
* @return string|false Thumbnail URL on success, false on failure.
|
||||
*/
|
||||
function wp_get_attachment_thumb_url( $post_id = 0 ) {
|
||||
|
@ -7399,7 +7398,7 @@ function _future_post_hook( $deprecated, $post ) {
|
|||
* @since 2.3.0
|
||||
* @access private
|
||||
*
|
||||
* @param int $post_id The ID in the database table of the post being published.
|
||||
* @param int $post_id The ID of the post being published.
|
||||
*/
|
||||
function _publish_post_hook( $post_id ) {
|
||||
if ( defined( 'XMLRPC_REQUEST' ) ) {
|
||||
|
@ -7654,7 +7653,7 @@ function _prime_post_caches( $ids, $update_term_cache = true, $update_meta_cache
|
|||
* @since 4.5.0
|
||||
* @access private
|
||||
*
|
||||
* @param string $post_name Slug.
|
||||
* @param string $post_name Post slug.
|
||||
* @param int $post_ID Optional. Post ID that should be ignored. Default 0.
|
||||
*/
|
||||
function wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post_ID = 0 ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-51426';
|
||||
$wp_version = '5.9-alpha-51430';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue