diff --git src/bp-core/bp-core-taxonomy.php src/bp-core/bp-core-taxonomy.php
index da68e04..1573157 100644
|
|
function bp_get_object_terms( $object_ids, $taxonomies, $args = array() ) { |
79 | 79 | |
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 | } |
| 110 | No newline at end of file |
diff --git src/bp-members/bp-members-functions.php src/bp-members/bp-members-functions.php
index 1abbc8f..346e7f9 100644
|
|
function bp_remove_member_type( $user_id, $member_type ) { |
2616 | 2616 | return false; |
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. |
2622 | 2622 | if ( ! is_wp_error( $deleted ) ) { |