get_meta_keys

Get a list of previously defined keys.

Description

get_meta_keys(); 

Usage

  1. if ( !function_exists( 'get_meta_keys' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/post.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_meta_keys(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/post.php  
  1. function get_meta_keys() { 
  2. global $wpdb; 
  3.  
  4. $keys = $wpdb->get_col( " 
  5. SELECT meta_key 
  6. FROM $wpdb->postmeta 
  7. GROUP BY meta_key 
  8. ORDER BY meta_key" ); 
  9.  
  10. return $keys;