WordPress at Your Fingertips
function is not described

get_meta_keys() WP 1.2.0

Get a list of previously defined keys.

No Hooks.

Return

Mixed.

Usage

get_meta_keys();

Notes

  • Global. wpdb. $wpdb WordPress database abstraction object.

Changelog

Since 1.2.0 Introduced.

Code of get_meta_keys() WP 5.8.2

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;
}