Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/14/2023 04:11:52 AM (12 months ago)
Author:
imath
Message:

Administration: add Group slugs management into the URLs settings tab

  • Add a new $built_in argument to bp_get_group_screens() to only get BP built in single Groups item screens.
  • Edit the BP_Groups_Component::setup_nav() method so that it uses bp_get_group_screens() to generate the single group's navigation items.
  • bp_get_group_screens() is making it easier to manage all single group's nav item slugs from the BP Urls settings tab.

Props r-a-y, johnjamesjacoby, boonebgorges

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-template.php

    r13449 r13451  
    32433243        }
    32443244
    3245         $views = bp_get_group_screens( 'read' );
    3246         if ( isset( $views[ $page ]['rewrite_id'] ) ) {
    3247             $page = bp_rewrites_get_slug( 'groups', $views[ $page ]['rewrite_id'], $page );
     3245        $screens = bp_get_group_screens( 'read' );
     3246        if ( isset( $screens[ $page ]['rewrite_id'] ) ) {
     3247            $page = bp_rewrites_get_slug( 'groups', $screens[ $page ]['rewrite_id'], $page );
    32483248        }
    32493249
     
    33033303        }
    33043304
    3305         $views = bp_get_group_screens( 'manage' );
    3306         if ( isset( $views[ $page ]['rewrite_id'] ) ) {
    3307             $page = bp_rewrites_get_slug( 'groups', $views[ $page ]['rewrite_id'], $page );
     3305        $screens = bp_get_group_screens( 'manage' );
     3306        if ( isset( $screens[ $page ]['rewrite_id'] ) ) {
     3307            $page = bp_rewrites_get_slug( 'groups', $screens[ $page ]['rewrite_id'], $page );
    33083308        }
    33093309
Note: See TracChangeset for help on using the changeset viewer.