Make WordPress Core


Ignore:
Timestamp:
11/30/2006 08:48:56 AM (18 years ago)
Author:
markjaquith
Message:

Remember old post slugs and automatically redirect to the new slug. fixes #3202

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upgrade-functions.php

    r4495 r4556  
    175175    if ( $wp_current_db_version < 3845 )
    176176        upgrade_210();
     177
     178    if ( $wp_current_db_version < 4351 )
     179        upgrade_old_slugs();
    177180
    178181    $wp_rewrite->flush_rules();
     
    544547    }
    545548}
     549
     550function upgrade_old_slugs() {
     551    // upgrade people who were using the Redirect Old Slugs plugin
     552    global $wpdb;
     553    $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_wp_old_slug' WHERE meta_key = 'old_slug'");
     554}
     555
    546556
    547557// The functions we use to actually do stuff
Note: See TracChangeset for help on using the changeset viewer.