[wp-trac] Re: [WordPress Trac] #6492: Guids No Longer Have
Permalink Format
WordPress Trac
wp-trac at lists.automattic.com
Fri May 9 08:19:00 GMT 2008
#6492: Guids No Longer Have Permalink Format
------------------------+---------------------------------------------------
Reporter: brianwhite | Owner: anonymous
Type: defect | Status: reopened
Priority: normal | Milestone: 2.5.2
Component: General | Version: 2.5.1
Severity: normal | Resolution:
Keywords: regression |
------------------------+---------------------------------------------------
Changes (by andym4e):
* version: 2.5 => 2.5.1
* severity: trivial => normal
* milestone: 2.7 => 2.5.2
Comment:
I am havng real issues with this as we rely on clean, SEO permalinks which
used to be save in the GUID field when we created a post:(
Could someone explain which part of the function mentioned above (and
posted below) I change?
Cheers
function _transition_post_status($new_status, $old_status, $post) {
global $wpdb;
if ( $old_status != 'publish' && $new_status == 'publish' ) {
// Reset GUID if transitioning to publish and it is empty
if ( '' == get_the_guid($post->ID) )
$wpdb->update( $wpdb->posts, array( 'guid' =>
get_permalink( $post->ID ) ), array( 'ID' => $post->ID ) );
do_action('private_to_published', $post->ID); //
Deprecated, use private_to_publish
}
// Always clears the hook in case the post status bounced from
future to draft.
wp_clear_scheduled_hook('publish_future_post', $post->ID);
}
--
Ticket URL: <http://trac.wordpress.org/ticket/6492#comment:9>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list