Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/12/2023 10:12:37 PM (23 months ago)
Author:
imath
Message:

Administration: add a new settings tab to manage slugs customization

Compared to [13442], change the logic of Components user navigation
generation by introducing a BP_Component::register_nav() method to
globalize the nav items early (ie: the registration step) and make them
available for the new settings tab to manage slugs customization.

After a second thought, the BP_Component::setup_nav() should remain the
navigation generation step instead of playing the registration role. This
will maximize backward compatibility & third party plugins wishing their
slugs to be customizable will need to "opt-in" for BP Rewrites using the
BP_Component::register_nav() method.

This first version of the URLs settings tab does not handle slugs
customization yet, its first usage is to make sure all BP Components user
navigation slugs were registered & to put the Accordion UI in place.

Props r-a-y, johnjamesjacoby, boonebgorges

Closes https://github.com/buddypress/buddypress/pull/84
See #4954

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-caps.php

    r13405 r13450  
    305305
    306306/**
     307 * Callback function to inform whether current user can moderate the community.
     308 *
     309 * @since 12.0.0
     310 *
     311 * @return boolean True if current user can moderate the community. False otherwise.
     312 */
     313function bp_current_user_can_moderate() {
     314    return bp_current_user_can( 'bp_moderate' );
     315}
     316
     317/**
    307318 * Check whether the specified user has a given capability on a given site.
    308319 *
Note: See TracChangeset for help on using the changeset viewer.