Ticket #12306: post.php.2.diff
File post.php.2.diff, 677 bytes (added by , 15 years ago) |
---|
-
post.php
3405 3405 3406 3406 if ( empty($url) ) //If any of the above options failed, Fallback on the GUID as used pre-2.7, not recomended to rely upon this. 3407 3407 $url = get_the_guid( $post->ID ); 3408 3409 $attachment_types = array_merge( array('attachment'), get_post_types( array('inherit_type' => 'attachment') ) ); 3408 3410 3409 if ( 'attachment' != $post->post_type|| empty($url) )3411 if ( ! in_array($post->post_type, $attachment_types) || empty($url) ) 3410 3412 return false; 3411 3413 3412 3414 return apply_filters( 'wp_get_attachment_url', $url, $post->ID );