[buddypress-trac] [BuddyPress Trac] #7077: Add a global scope option to the BP taxonomy wrapper functions
buddypress-trac
noreply at wordpress.org
Mon May 23 14:07:01 UTC 2016
#7077: Add a global scope option to the BP taxonomy wrapper functions
------------------------------+-----------------------------
Reporter: rekmla | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Component - Core | Version:
Severity: normal | Resolution:
Keywords: has-patch |
------------------------------+-----------------------------
Comment (by rekmla):
I'll add a patch with all 3 taxonomy wrapper functions. The function
get_site_by_path returns an object, so I've changed the filter function
accordingly.
{{{#!php
function bp7077_filter_taxonomy_storage_site( $site_id, $taxonomy ) {
if ( 'bp_member_type' === $taxonomy ) {
$main_network = wp_get_network( get_main_network_id() );
$site = get_site_by_path( $main_network->domain,
$main_network->path );
}
return $site->site_id;
}
add_filter( 'bp_get_taxonomy_term_site_id',
'bp7077_filter_taxonomy_storage_site', 10, 2 );
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7077#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list