Created
November 17, 2012 22:34
-
-
Save ataylorme/4100830 to your computer and use it in GitHub Desktop.
Change custom field metakey in WordPress database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ChangeMetaKey($old, $new){ | |
global $wpdb; | |
$wpdb->query( " | |
update $wpdb->postmeta | |
set meta_key = '$new' | |
where meta_key = '$old' | |
"); | |
}//end change metakey |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment