Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/18/2023 09:42:31 AM (19 months ago)
Author:
imath
Message:

BP Rewrites: start the migration process for the Groups component

  • Add rewrite tags & rules for the Groups directory type and the create URLs.
  • Introduce bp_get_group_url()/bp_group_url() & to retrieve/output a Groups single item URL using BP Rewrites.
  • Introduce bp_get_group_restricted_screens(), bp_get_group_extension_screens() & bp_get_group_screens() to get information about the Groups screens (in particular each screen rewrite ID). These functions will ease slug customizations from the BuddyPress URL settings tab.
  • Improve the Group creation process making sure it's using BP Rewrites to build URLs.
  • Perform easiest replacements for bp_get_group_permalink()/bp_group_permalink() & bp_get_groups_directory_permalink()/bp_groups_directory_permalink() in favor of bp_get_group_url()/bp_group_url() & bp_get_groups_directory_url()/bp_groups_directory_url()`.
  • Improve code formatting & properly escape single group URLs into templates.
  • Update impacted Unit Tests.

Props r-a-y, johnjamesjacoby, boonebgorges

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-group-extension.php

    r13399 r13437  
    731731
    732732        if ( $user_can_see_nav_item ) {
    733             $group_permalink = bp_get_group_permalink( groups_get_current_group() );
     733            $group_permalink = bp_get_group_url( groups_get_current_group() );
    734734
    735735            bp_core_create_subnav_link( array(
     
    750750
    751751        if ( $user_can_visit ) {
    752             $group_permalink = bp_get_group_permalink( groups_get_current_group() );
     752            $group_permalink = bp_get_group_url( groups_get_current_group() );
    753753
    754754            bp_core_register_subnav_screen_function( array(
Note: See TracChangeset for help on using the changeset viewer.