[wp-hackers] Re: permalinks redirected despite WP_SITEURL
Viper007Bond
viper at viper007bond.com
Mon Aug 25 21:51:59 GMT 2008
Hmm, sure enough. What a dirty/bad hack, heh.
On Mon, Aug 25, 2008 at 2:20 PM, Jason Webster <jason at intraffic.net> wrote:
> Otto proved that wrong:
>
> function wp_get_attachment_url( $post_id = 0 ) {
> $post_id = (int) $post_id;
> if ( !$post =& get_post( $post_id ) )
> return false;
>
> $url = get_the_guid( $post->ID );
>
> if ( 'attachment' != $post->post_type || !$url )
> return false;
>
> return apply_filters( 'wp_get_attachment_url', $url, $post->ID );
>
>
>
> Viper007Bond wrote:
>
>> The GUID is just there for things like the RSS feed that need to be able
>> to
>> tell readers if a post is new or not regardless of a change in the URL,
>> title, content, etc.
>>
>> WordPress uses the post IDs internally and I don't believe touches the
>> GUID
>> for anything URL related. Just look at get_permalink().
>>
>>
>>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
Viper007Bond | http://www.viper007bond.com/ | http://www.finalgear.com/
More information about the wp-hackers
mailing list