Ticket #12306: post.php.diff
File post.php.diff, 638 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 = apply_filters('attachment_types', array('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 );