Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/23/2023 07:35:38 PM (13 months ago)
Author:
imath
Message:

Make BP_Core_Nav generate "BP Rewrites ready" navigation links

  • Remove all components $parent_url attributes when setting sub nav items.
  • Only use the bp_core_create_nav_link() $link attribute argument & the bp_core_create_subnav_link() $parent_url attribute argument if specified to preserve backward compatibility.
  • Migrates the Community search feature so that it uses BP Rewrites.
  • Perform some bp_loggedin_user_domain() in favor of bp_loggedin_user_url().
  • Update some PHPUnit tests.

Props r-a-y, johnjamesjacoby, boonebgorges

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

File:
1 edited

Legend:

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

    r13437 r13441  
    737737                'slug'            => $this->slug,
    738738                'parent_slug'     => bp_get_current_group_slug(),
    739                 'parent_url'      => $group_permalink,
    740739                'position'        => $this->nav_item_position,
    741740                'item_css_id'     => 'nav-' . $this->slug,
     
    960959        }
    961960
    962         $screen = $this->screens['edit'];
    963 
    964         $position = isset( $screen['position'] ) ? (int) $screen['position'] : 10;
    965         $position += 40;
    966 
     961        $screen        = $this->screens['edit'];
     962        $position      = isset( $screen['position'] ) ? (int) $screen['position'] : 10;
     963        $position     += 40;
    967964        $current_group = groups_get_current_group();
    968         $admin_link    = trailingslashit( bp_get_group_permalink( $current_group ) . 'admin' );
    969965
    970966        $subnav_args = array(
     
    972968            'slug'            => $screen['slug'],
    973969            'parent_slug'     => $current_group->slug . '_manage',
    974             'parent_url'      => $admin_link,
    975970            'user_has_access' => bp_is_item_admin(),
    976971            'position'        => $position,
Note: See TracChangeset for help on using the changeset viewer.