add_pmpro_membership_level_meta

Pmpro_membership_level Meta Functions.

Description

add_pmpro_membership_level_meta( $level_id, $meta_key, $meta_value, (constant) $unique = false ); 

Parameters (4)

0. $level_id
The level id.
1. $meta_key
The meta key.
2. $meta_value
The meta value.
3. $unique — Optional. (constant) => false
The unique.

Usage

  1. if ( !function_exists( 'add_pmpro_membership_level_meta' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/functions.php'; 
  3.  
  4. // The level id. 
  5. $level_id = null; 
  6.  
  7. // The meta key. 
  8. $meta_key = null; 
  9.  
  10. // The meta value. 
  11. $meta_value = null; 
  12.  
  13. // The unique. 
  14. $unique = false; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = add_pmpro_membership_level_meta($level_id, $meta_key, $meta_value, $unique); 
  18.  

Defined (1)

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

/includes/functions.php  
  1. function add_pmpro_membership_level_meta($level_id, $meta_key, $meta_value, $unique = false) {  
  2. return add_metadata('pmpro_membership_level', $level_id, $meta_key, $meta_value, $unique);