Changeset 7885 for trunk/bp-xprofile/bp-xprofile-functions.php
- Timestamp:
- 02/14/2014 07:21:52 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-functions.php
r7883 r7885 634 634 * @param string $meta_key Key of the metadata being updated. 635 635 * @param mixed $meta_value Value of the metadata being updated. 636 * @param mixed $prev_value Optional. If specified, only update existing 637 * metadata entries with the specified value. Otherwise, update all 638 * entries. 636 639 * @return bool True on success, false on failure. 637 640 */ 638 function bp_xprofile_update_meta( $object_id, $object_type, $meta_key, $meta_value ) {641 function bp_xprofile_update_meta( $object_id, $object_type, $meta_key, $meta_value, $prev_value = '' ) { 639 642 640 643 // Legacy - sanitize meta_key … … 643 646 add_filter( 'query', 'bp_filter_metaid_column_name' ); 644 647 add_filter( 'query', 'bp_xprofile_filter_meta_query' ); 645 $retval = update_metadata( 'xprofile_' . $object_type, $object_id, $meta_key, $meta_value );648 $retval = update_metadata( 'xprofile_' . $object_type, $object_id, $meta_key, $meta_value, $prev_value ); 646 649 remove_filter( 'query', 'bp_xprofile_filter_meta_query' ); 647 650 remove_filter( 'query', 'bp_filter_metaid_column_name' );
Note: See TracChangeset
for help on using the changeset viewer.