Skip to:
Content

BuddyPress.org

Changes between Version 1 and Version 2 of Ticket #7935, comment 8


Ignore:
Timestamp:
09/11/2018 05:11:41 PM (8 years ago)
Author:
r-a-y
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7935, comment 8

    v1 v2  
    55> What about adding a new component_id parameter to nav functions and make the slug and css_id parameters fall back to it ?
    66
    7 I like this idea.  Instead of making the ID fall back to `slug` or `css_id`, I left it empty.  See `03.patch`.  I'm setting the ID in `class-bp-component.php`, so the ID should always be set for most developers extending the `BP_Component` class.  A minor thing is if a plugin is overriding the `setup_nav` method, but this isn't really a big deal since this ticket is only dealing with core components requiring their screen function code.
     7I like this idea.  Instead of making the ID fall back to `slug` or `css_id`, I left it empty.  See `03.patch`.  I'm setting the ID in `class-bp-component.php`, so the ID should always be set for most developers extending the `BP_Component` class.  A minor thing is if a plugin is overriding the `setup_nav` method and not calling the `parent::setup_nav()` method, but this isn't really a big deal since this ticket is only dealing with core components requiring their screen function code.
    88
    99Logically, I think `03.patch` is better, but `02.patch` is simpler.