Changeset 9589
- Timestamp:
- 03/03/2015 08:01:25 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-taxonomy.php
r9519 r9589 80 80 return $retval; 81 81 } 82 83 /** 84 * Remove taxonomy terms on a BuddyPress object. 85 * 86 * @since BuddyPress (2.3.0) 87 * 88 * @see wp_remove_object_terms() for a full description of function and parameters. 89 * 90 * @param int $object_id Object ID. 91 * @param string|array $terms Term or terms to remove. 92 * @param string $taxonomy Taxonomy name. 93 * @return bool|WP_Error True on success, false or WP_Error on failure. 94 */ 95 function bp_remove_object_terms( $object_id, $terms, $taxonomy ) { 96 $is_root_blog = bp_is_root_blog(); 97 98 if ( ! $is_root_blog ) { 99 switch_to_blog( bp_get_root_blog_id() ); 100 } 101 102 $retval = wp_remove_object_terms( $object_id, $terms, $taxonomy ); 103 104 if ( ! $is_root_blog ) { 105 restore_current_blog(); 106 } 107 108 return $retval; 109 } -
trunk/src/bp-members/bp-members-functions.php
r9575 r9589 2617 2617 } 2618 2618 2619 $deleted = wp_remove_object_terms( $user_id, $member_type, 'bp_member_type' );2619 $deleted = bp_remove_object_terms( $user_id, $member_type, 'bp_member_type' ); 2620 2620 2621 2621 // Bust the cache if the type has been removed.
Note: See TracChangeset
for help on using the changeset viewer.