get_meta_keys

函数


get_meta_keys ( No parameters )
返回值
  • (string[]) Array of meta key names.
定义位置
  • wp-admin/includes/post.php
    , line 995
引入
1.2.0
弃用

Returns a list of previously defined keys.

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