Changeset 7872 for trunk/bp-activity/bp-activity-functions.php
- Timestamp:
- 02/14/2014 12:08:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-functions.php
r7854 r7872 668 668 $retval = true; 669 669 } 670 671 return $retval; 672 } 673 674 /** 675 * Add a piece of activity metadata. 676 * 677 * @since BuddyPress (2.0.0) 678 * 679 * @param int $activity_id ID of the activity item. 680 * @param string $meta_key Metadata key. 681 * @param mixed $meta_value Metadata value. 682 * @param bool $unique. Optional. Whether to enforce a single metadata value 683 * for the given key. If true, and the object already has a value for 684 * the key, no change will be made. Default: false. 685 * @return int|bool The meta ID on successful update, false on failure. 686 */ 687 function bp_activity_add_meta( $activity_id, $meta_key, $meta_value, $unique = false ) { 688 add_filter( 'query', 'bp_filter_metaid_column_name' ); 689 $retval = add_metadata( 'activity', $activity_id, $meta_key, $meta_value, $unique ); 690 remove_filter( 'query', 'bp_filter_metaid_column_name' ); 670 691 671 692 return $retval;
Note: See TracChangeset
for help on using the changeset viewer.