bb_update_postmeta

The BuddyPress bb update postmeta function.

Description

bb_update_postmeta( $post_id, $meta_key, $meta_value ); 

Parameters (3)

0. $post_id
The post id.
1. $meta_key
The meta key.
2. $meta_value
The meta value.

Usage

  1. if ( !function_exists( 'bb_update_postmeta' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-meta.php'; 
  3.  
  4. // The post id. 
  5. $post_id = null; 
  6.  
  7. // The meta key. 
  8. $meta_key = null; 
  9.  
  10. // The meta value. 
  11. $meta_value = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bb_update_postmeta($post_id, $meta_key, $meta_value); 
  15.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-meta.php  
  1. function bb_update_postmeta( $post_id, $meta_key, $meta_value ) 
  2. return bb_update_meta( $post_id, $meta_key, $meta_value, 'post' );