[wp-hackers] Re: permalinks redirected despite WP_SITEURL

Daniel Torreblanca regulatethis at gmail.com
Tue Aug 26 01:13:05 GMT 2008


I knew I wasn't crazy ;)

On Mon, Aug 25, 2008 at 5:51 PM, Viper007Bond <viper at viper007bond.com> wrote:
> 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/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list