-
-
Save w3guy/00f5af91a5d833c5cbe5879bae62b7e5 to your computer and use it in GitHub Desktop.
Get All WordPress User Meta Keys
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
<?php | |
/** | |
* Returns all unique meta key from user meta database | |
* | |
* @param no parameter right now | |
* @retun std Class | |
* @todo do what you do for each meta key. | |
*/ | |
function get_user_meta_key() { | |
global $wpdb; | |
$select = "SELECT distinct $wpdb->usermeta.meta_key FROM $wpdb->usermeta"; | |
$usermeta = $wpdb->get_results($select); | |
return $usermeta; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment