upgrade_old_slugs

Upgrade old slugs made in version 2.2.

Description

upgrade_old_slugs(); 

Usage

  1. if ( !function_exists( 'upgrade_old_slugs' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/upgrade.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = upgrade_old_slugs(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/upgrade.php  
  1. function upgrade_old_slugs() { 
  2. // Upgrade people who were using the Redirect Old Slugs plugin. 
  3. global $wpdb; 
  4. $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_wp_old_slug' WHERE meta_key = 'old_slug'");