Log in with username/password: lyceum/lyceum

Ticket #901 (new enhancement)

Opened 8 months ago

On updating blog slug, update the post's guid

Reported by: lyceum Assigned to:
Priority: normal Milestone: 1.1.1
Keywords: updating slug, guid Cc: donatas@infosys.lt

Description

After wp-admin/options.php line 158 (updating blogs table) add a query to update posts table - that would allow a user to change his slug without breaking the links to his previous posts. In my case (http://domain.tld/user/%post_id%) this query works:

$wpdb->query("UPDATE $wpdb->posts SET guid = REPLACE(guid, '".LURL."/$oldslug/', '".LURL."/$slug/') WHERE guid like '".LURL."/$oldslug/%'");

This should work with any http://domain.tld/user/ display type, not sure how about http://user.domain.tld/.

Log in with username/password: lyceum/lyceum