From f5aab6e25dbb84bffbf2dd0e4f417be2c1794e08 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 16 Jul 2016 13:05:29 +0000 Subject: [PATCH] Docs: Correct `$post` parameter name and description for `wp_attachment_is()` and `wp_attachment_is_image()`. Props flixos90. Fixes #37377. Built from https://develop.svn.wordpress.org/trunk@38068 git-svn-id: http://core.svn.wordpress.org/trunk@38009 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 12 ++++++------ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 26a588ba23..225f8dbf39 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -5042,12 +5042,12 @@ function wp_get_attachment_thumb_url( $post_id = 0 ) { * * @since 4.2.0 * - * @param string $type Attachment type. Accepts 'image', 'audio', or 'video'. - * @param int|WP_Post $post_id Optional. Attachment ID. Default 0. + * @param string $type Attachment type. Accepts 'image', 'audio', or 'video'. + * @param int|WP_Post $post Optional. Attachment ID or object. Default is global $post. * @return bool True if one of the accepted types, false otherwise. */ -function wp_attachment_is( $type, $post_id = 0 ) { - if ( ! $post = get_post( $post_id ) ) { +function wp_attachment_is( $type, $post = null ) { + if ( ! $post = get_post( $post ) ) { return false; } @@ -5093,10 +5093,10 @@ function wp_attachment_is( $type, $post_id = 0 ) { * @since 4.2.0 Modified into wrapper for wp_attachment_is() and * allowed WP_Post object to be passed. * - * @param int|WP_Post $post Optional. Attachment ID. Default 0. + * @param int|WP_Post $post Optional. Attachment ID or object. Default is global $post. * @return bool Whether the attachment is an image. */ -function wp_attachment_is_image( $post = 0 ) { +function wp_attachment_is_image( $post = null ) { return wp_attachment_is( 'image', $post ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 2975052aad..0a04b36b19 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-beta3-38067'; +$wp_version = '4.6-beta3-38068'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.