Changeset 7885 for trunk/bp-activity/bp-activity-functions.php
- Timestamp:
- 02/14/2014 07:21:52 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-functions.php
r7883 r7885 653 653 * @since BuddyPress (1.2) 654 654 * 655 * @param int $activity_id ID of the activity item whose metadata is being updated. 655 * @param int $activity_id ID of the activity item whose metadata is being 656 * updated. 656 657 * @param string $meta_key Key of the metadata being updated. 657 658 * @param mixed $meta_value Value to be set. 659 * @param mixed $prev_value Optional. If specified, only update existing 660 * metadata entries with the specified value. Otherwise, update all 661 * entries. 658 662 * @return bool True on success, false on failure. 659 663 */ 660 function bp_activity_update_meta( $activity_id, $meta_key, $meta_value ) {664 function bp_activity_update_meta( $activity_id, $meta_key, $meta_value, $prev_value = '' ) { 661 665 662 666 // Legacy - Make sure activity_id is valid … … 669 673 670 674 add_filter( 'query', 'bp_filter_metaid_column_name' ); 671 $retval = update_metadata( 'activity', $activity_id, $meta_key, $meta_value );675 $retval = update_metadata( 'activity', $activity_id, $meta_key, $meta_value, $prev_value ); 672 676 remove_filter( 'query', 'bp_filter_metaid_column_name' ); 673 677
Note: See TracChangeset
for help on using the changeset viewer.