Ticket #59698: 59698.2.diff
| File 59698.2.diff, 797 bytes (added by , 2 years ago) |
|---|
-
src/wp-includes/post.php
6665 6665 * 6666 6666 * @since 4.2.0 6667 6667 * 6668 * @param string $type Attachment type. Accepts 'image', 'audio', or 'video'.6668 * @param string $type The type of attachment to check. Valid values are `image`, `audio`, `video`, or a file extension. 6669 6669 * @param int|WP_Post $post Optional. Attachment ID or object. Default is global $post. 6670 * @return bool True if one of the accepted types, false otherwise.6670 * @return bool True if an accepted type or a matching file extension, false otherwise. 6671 6671 */ 6672 6672 function wp_attachment_is( $type, $post = null ) { 6673 6673 $post = get_post( $post );