Skip to:
Content

BuddyPress.org

Ticket #7077: 7077.4.patch

File 7077.4.patch, 621 bytes (added by Offereins, 3 years ago)

Fix registration of BP's taxonomies in bp_get_object_terms()

  • src/bp-core/bp-core-taxonomy.php

    diff --git a/src/bp-core/bp-core-taxonomy.php b/src/bp-core/bp-core-taxonomy.php
    index 820a144..46468d2 100644
    a b function bp_get_object_terms( $object_ids, $taxonomies, $args = array() ) { 
    124124                $switched = false;
    125125                if ( $taxonomy_site_id !== get_current_blog_id() ) {
    126126                        switch_to_blog( $site_id );
    127                         bp_register_taxonomies();
    128127                        $switched = true;
    129128                }
    130129
     130                bp_register_taxonomies();
     131
    131132                $site_terms = wp_get_object_terms( $object_ids, $site_taxonomies, $args );
    132133                $retval     = array_merge( $retval, $site_terms );
    133134