pmpro_getMetavalues

The Paid Memberships Pro pmpro getMetavalues function.

Description

pmpro_getMetavalues( $query ); 

Parameters (1)

0. $query
The query.

Usage

  1. if ( !function_exists( 'pmpro_getMetavalues' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/functions.php'; 
  3.  
  4. // The query. 
  5. $query = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = pmpro_getMetavalues($query); 
  9.  

Defined (1)

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

/includes/functions.php  
  1. function pmpro_getMetavalues($query) 
  2. global $wpdb; 
  3.  
  4. $results = $wpdb->get_results($query); 
  5. $r = new stdClass(); 
  6. foreach($results as $result) 
  7. if(!empty($r) && !empty($result->key)) 
  8. $r->{$result->key} = $result->value; 
  9.  
  10. return $r;