wpseek.com
A WordPress-centric search engine for devs and theme authors



get_meta_keys › WordPress Function

Since1.2.0
Deprecatedn/a
get_meta_keys ( No parameters )
Returns:
  • (string[]) Array of meta key names.
Defined at:
Codex:

Returns a list of previously defined keys.



Source

function get_meta_keys() {
	global $wpdb;

	$keys = $wpdb->get_col(
		"SELECT meta_key
		FROM $wpdb->postmeta
		GROUP BY meta_key
		ORDER BY meta_key"
	);

	return $keys;
}