Skip to content

Instantly share code, notes, and snippets.

@alexkingorg
Created January 7, 2014 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexkingorg/8304582 to your computer and use it in GitHub Desktop.
Save alexkingorg/8304582 to your computer and use it in GitHub Desktop.
Register all WP postmeta keys using the [CF Revision Manager](https://github.com/crowdfavorite/wp-revision-manager)
<?php
global $wpdb;
$keys = $wpdb->get_col("
SELECT DISTINCT meta_key
FROM $wpdb->postmeta
");
foreach ($keys as $key) {
cfr_register_metadata($key);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment