Changeset 38068
- Timestamp:
- 07/16/2016 01:04:01 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r38051 r38068 5043 5043 * @since 4.2.0 5044 5044 * 5045 * @param string $type 5046 * @param int|WP_Post $post _id Optional. Attachment ID. Default 0.5045 * @param string $type Attachment type. Accepts 'image', 'audio', or 'video'. 5046 * @param int|WP_Post $post Optional. Attachment ID or object. Default is global $post. 5047 5047 * @return bool True if one of the accepted types, false otherwise. 5048 5048 */ 5049 function wp_attachment_is( $type, $post _id = 0) {5050 if ( ! $post = get_post( $post _id) ) {5049 function wp_attachment_is( $type, $post = null ) { 5050 if ( ! $post = get_post( $post ) ) { 5051 5051 return false; 5052 5052 } … … 5094 5094 * allowed WP_Post object to be passed. 5095 5095 * 5096 * @param int|WP_Post $post Optional. Attachment ID . Default 0.5096 * @param int|WP_Post $post Optional. Attachment ID or object. Default is global $post. 5097 5097 * @return bool Whether the attachment is an image. 5098 5098 */ 5099 function wp_attachment_is_image( $post = 0) {5099 function wp_attachment_is_image( $post = null ) { 5100 5100 return wp_attachment_is( 'image', $post ); 5101 5101 }
Note: See TracChangeset
for help on using the changeset viewer.