[buddypress-trac] [BuddyPress] #3578: Determine $bp->component->root_slug automatically

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Sep 14 16:47:18 UTC 2011

#3578: Determine $bp->component->root_slug automatically
 Reporter:  boonebgorges  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  1.5.1
Component:  Core          |     Version:  1.5
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |

Comment (by johnjamesjacoby):

 There are components that don't have root_slugs that never have them set.
 Friends, Messages, and Settings are good examples. I'd like to keep the
 root_slug argument around if/when we move components into custom post
 types, or if the directory-to-page idea doesn't work in practice.

 The other reason was to keep decision making up to the individual
 component loaders and leave the lower level processing to the BP_Component
 class. In this instance it wasn't about DRY as much as developer
 understanding, using the BP core components as examples of how to use it.

 The goal is ease of use and clarity of understanding. If you think it's
 too confusing now, I think 3578-defaults.patch is the best approach. Keep
 in mind this opens the door into moving each of the assignments towards
 having defaults in BP_Component::setup_globals() which I'd also like to

 Point being, if the class isn't used 'correctly' is it responsible for
 making assumptions or does it do exactly what it's told.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3578#comment:2>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list