[buddypress-trac] [BuddyPress Trac] #7077: Add a global scope option to the BP taxonomy wrapper functions

buddypress-trac noreply at wordpress.org
Tue May 31 18:08:40 UTC 2016


#7077: Add a global scope option to the BP taxonomy wrapper functions
------------------------------+---------------------------
 Reporter:  rekmla            |       Owner:  boonebgorges
     Type:  enhancement       |      Status:  reopened
 Priority:  normal            |   Milestone:  2.6
Component:  Component - Core  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |
------------------------------+---------------------------

Comment (by boonebgorges):

 I'm thinking through this more, and I'm having a hard time imagining why
 BP would fail to register its taxonomies on the current site, and so would
 need taxonomy registration as suggested in [attachment:7077.4.patch].
 @Offereins If you can provide any more info about your setup, it'd be very
 helpful.

 I want to be cautious about re-registering taxonomies, as there may be
 cases where a plugin is doing just-in-time modification of these
 taxonomies, in such a way that re-registering unnecessarily would cause
 these changes to be overwritten. It may be better to do something like

 {{{
 $taxonomies_exist = true;
 foreach ( $taxonomies as $taxonomy ) {
     if ( ! taxonomy_exists( $taxonomy ) ) {
         $taxonomies_exist = false;
         break;
     }
 }

 if ( ! $taxonomies_exist ) {
     bp_register_taxonomies();
 }
 }}}

 though even this is not perfect.

 My preference would be to fix whatever problem (assuming it's a problem!)
 that's preventing the taxonomies from being registered in the first place
 :)

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7077#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list