From ea9bf63acc50ddb2dcb984a7152b06219d916b9d Mon Sep 17 00:00:00 2001 From: joedolson Date: Fri, 12 Jan 2024 16:49:16 +0000 Subject: [PATCH] Media: Fix inaccurate docs for `wp_attachment_is()`. Correct the documentation for the `$type` parameter to accept file extensions as well as attachment type groups. Also fix the return description to reflect the change. Props nirav7707, joedolson. Fixes #59698. Built from https://develop.svn.wordpress.org/trunk@57273 git-svn-id: http://core.svn.wordpress.org/trunk@56779 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 25fefbb621..69a6362552 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -6665,9 +6665,9 @@ function wp_get_attachment_thumb_url( $post_id = 0 ) { * * @since 4.2.0 * - * @param string $type Attachment type. Accepts 'image', 'audio', or 'video'. + * @param string $type Attachment type. Accepts `image`, `audio`, `video`, or a file extension. * @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 an accepted type or a matching file extension, false otherwise. */ function wp_attachment_is( $type, $post = null ) { $post = get_post( $post ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 6b40365fde..f455373ad8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57272'; +$wp_version = '6.5-alpha-57273'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.