WordPress at Your Fingertips
function is not described

upgrade_old_slugs() WP 2.2.0

Upgrade old slugs made in version 2.2.

No Hooks.

Return

null. Nothing.

Usage

upgrade_old_slugs();

Notes

  • Global. wpdb. $wpdb WordPress database abstraction object.

Changelog

Since 2.2.0 Introduced.

Code of upgrade_old_slugs() WP 5.8.2

function upgrade_old_slugs() {
	// Upgrade people who were using the Redirect Old Slugs plugin.
	global $wpdb;
	$wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = '_wp_old_slug' WHERE meta_key = 'old_slug'" );
}