[wp-hackers] Re: permalinks redirected despite WP_SITEURL

Jason Webster jason at intraffic.net
Mon Aug 25 21:20:59 GMT 2008


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().
>
>   



More information about the wp-hackers mailing list