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
This commit is contained in:
Sergey Biryukov 2016-07-16 13:05:29 +00:00
parent 5cce706f3d
commit f5aab6e25d
2 changed files with 7 additions and 7 deletions

View File

@ -5043,11 +5043,11 @@ function wp_get_attachment_thumb_url( $post_id = 0 ) {
* @since 4.2.0 * @since 4.2.0
* *
* @param string $type Attachment type. Accepts 'image', 'audio', or 'video'. * @param string $type Attachment type. Accepts 'image', 'audio', or 'video'.
* @param int|WP_Post $post_id Optional. Attachment ID. Default 0. * @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. * @return bool True if one of the accepted types, false otherwise.
*/ */
function wp_attachment_is( $type, $post_id = 0 ) { function wp_attachment_is( $type, $post = null ) {
if ( ! $post = get_post( $post_id ) ) { if ( ! $post = get_post( $post ) ) {
return false; 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 * @since 4.2.0 Modified into wrapper for wp_attachment_is() and
* allowed WP_Post object to be passed. * 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. * @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 ); return wp_attachment_is( 'image', $post );
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.