Changeset 6518
- Timestamp:
- 06/10/2017 08:15:37 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/users/engagements.php
r6517 r6518 14 14 15 15 /** 16 * Set a user id onan object16 * Add a user id to an object 17 17 * 18 18 * @since 2.6.0 bbPress (r6109) … … 22 22 * @param string $meta_key The relationship key 23 23 * @param string $meta_type The relationship type 24 * @param bool $unique Whether metadata should be unique to the object 24 25 * 25 26 * @uses add_post_meta() To set the term on the object 26 * @uses apply_filters() Calls 'bbp_add_user_to_object' with the object id, user 27 * id, and taxonomy 28 * @return bool Returns true if the user taxonomy term is added to the object, 29 * otherwise false 30 */ 31 function bbp_add_user_to_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post' ) { 32 $retval = add_metadata( $meta_type, $object_id, $meta_key, $user_id, false ); 33 34 // Filter & return 35 return (bool) apply_filters( 'bbp_add_user_to_object', (bool) $retval, $object_id, $user_id, $meta_key, $meta_type ); 27 * @uses apply_filters() Calls 'bbp_add_user_to_object' with the return value & parameters 28 * @return bool Returns true if the user is added to the object, otherwise false 29 */ 30 function bbp_add_user_to_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post', $unique = true ) { 31 $retval = add_metadata( $meta_type, $object_id, $meta_key, $user_id, $unique ); 32 33 // Filter & return 34 return (bool) apply_filters( 'bbp_add_user_to_object', (bool) $retval, $object_id, $user_id, $meta_key, $meta_type, $unique ); 36 35 } 37 36
Note: See TracChangeset
for help on using the changeset viewer.