Skip to:
Content

BuddyPress.org

Changeset 13442


Ignore:
Timestamp:
03/27/2023 06:19:06 PM (3 years ago)
Author:
imath
Message:

Improve Components Member's single item navigation generation

  • Edit the BP_Component Class so that it globalize navigation items before registering it.
  • Introduce bp_get_component_navigations(), a new function that will be used to get Member's single navigation customizable slugs within the BuddyPress settings area.
  • Perform all remaining bp_loggedin_user_domain() replacements (55) in favor of the bp_loggedin_user_url() function which uses BP Rewrites to build URLs.
  • Improve bp_loggedin_user_link() by adding a new $chunks array of arguments to output escaped URL in templates.
  • Adapt some PHPUnit testcases.

Props r-a-y, johnjamesjacoby, boonebgorges

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

Location:
trunk
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/classes/class-bp-blogs-component.php

    r13441 r13442  
    224224                }
    225225
    226                 $slug       = bp_get_blogs_slug();
     226                $slug = bp_get_blogs_slug();
    227227
    228228                // Add 'Sites' to the main navigation.
  • trunk/src/bp-core/bp-core-functions.php

    r13441 r13442  
    48824882        return (int) apply_filters( 'bp_get_post_type_site_id', $site_id );
    48834883}
     4884
     4885/**
     4886 * Returns registered navigation items for all or a specific component.
     4887 *
     4888 * @since 12.0.0
     4889 *
     4890 * @param string $component The component ID.
     4891 * @return array            The list of registered navigation items.
     4892 */
     4893function bp_get_component_navigations( $component = '' ) {
     4894        $args = array();
     4895        if ( $component ) {
     4896                $args['id'] = $component;
     4897        }
     4898
     4899        $components  = bp_core_get_active_components( $args, 'objects' );
     4900        $navigations = array();
     4901
     4902        foreach ( $components as $key_component => $component ) {
     4903                if ( isset( $component->main_nav['rewrite_id'] ) ) {
     4904                        $navigations[ $key_component ]['main_nav'] = $component->main_nav;
     4905                }
     4906
     4907                if ( isset( $component->sub_nav ) && is_array( $component->sub_nav ) && $component->sub_nav ) {
     4908                        $navigations[ $key_component ]['sub_nav'] = $component->sub_nav;
     4909                }
     4910        }
     4911
     4912        return $navigations;
     4913}
  • trunk/src/bp-core/classes/class-bp-component.php

    r13432 r13442  
    187187         */
    188188        public $directory_title = '';
     189
     190        /**
     191         * Component's main nav items.
     192         *
     193         * @since 12.0.0
     194         * @var array
     195         */
     196        public $main_nav = array();
     197
     198        /**
     199         * Component's main nav sub items.
     200         *
     201         * @since 12.0.0
     202         * @var array
     203         */
     204        public $sub_nav  = array();
    189205
    190206        /** Methods ***************************************************************/
     
    529545
    530546                // Setup navigation.
    531                 add_action( 'bp_setup_nav',              array( $this, 'setup_nav'              ), 10 );
     547                add_action( 'bp_setup_nav',              array( $this, 'setup_nav'              ),  9 );
     548
     549                // Generate navigation.
     550                add_action( 'bp_setup_nav',              array( $this, 'generate_nav'           ), 10, 0 );
    532551
    533552                // Setup WP Toolbar menus.
     
    598617         *
    599618         * @since 1.5.0
    600          *
    601          * @see bp_core_new_nav_item() For a description of the $main_nav
    602          *      parameter formatting.
    603          * @see bp_core_new_subnav_item() For a description of how each item
    604          *      in the $sub_nav parameter array should be formatted.
     619         * @since 12.0.0 Uses `BP_Component::$main_nav` && `BP_Component::$sub_nav` to globalize nav items.
    605620         *
    606621         * @param array $main_nav Optional. Passed directly to bp_core_new_nav_item().
     
    611626         */
    612627        public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
    613 
     628                if ( isset( $main_nav['slug'] ) ) {
     629                        // Always set the component ID.
     630                        $this->main_nav['component_id'] = $this->id;
     631
     632                        if ( ! isset( $main_nav['rewrite_id'] ) ) {
     633                                $this->main_nav['rewrite_id'] = 'bp_member_' . str_replace( '-', '_', $main_nav['slug'] );
     634                        } elseif ( ! $main_nav['rewrite_id'] ) {
     635                                unset( $main_nav['rewrite_id'] );
     636                        }
     637
     638                        $this->main_nav = array_merge( $this->main_nav, $main_nav );
     639
     640                        // Sub nav items are not required.
     641                        if ( ! empty( $sub_nav ) ) {
     642                                foreach( (array) $sub_nav as $nav ) {
     643                                        if ( ! isset( $nav['slug'], $nav['parent_slug'] ) ) {
     644                                                continue;
     645                                        }
     646
     647                                        if ( ! isset( $nav['rewrite_id'] ) ) {
     648                                                $nav['rewrite_id'] = 'bp_member_' . str_replace( '-', '_', $nav['parent_slug'] ) . '_' . str_replace( '-', '_', $nav['slug'] );
     649                                        } elseif ( ! $nav['rewrite_id'] ) {
     650                                                unset( $nav['rewrite_id'] );
     651                                        }
     652
     653                                        $this->sub_nav[] = $nav;
     654                                }
     655                        }
     656                }
     657        }
     658
     659        /**
     660         * Generate component navigation using the nav/subnav set up in `BP_Component::setup_nav()`.
     661         *
     662         * @since 12.0.0
     663         *
     664         * @see bp_core_new_nav_item() For a description of the $main_nav
     665         *      parameter formatting.
     666         * @see bp_core_new_subnav_item() For a description of how each item
     667         *      in the $sub_nav parameter array should be formatted.
     668         */
     669        public function generate_nav() {
    614670                // No sub nav items without a main nav item.
    615                 if ( !empty( $main_nav ) ) {
    616                         // Always set the component ID.
    617                         $main_nav['component_id'] = $this->id;
    618 
    619                         bp_core_new_nav_item( $main_nav, 'members' );
     671                if ( $this->main_nav ) {
     672                        bp_core_new_nav_item( $this->main_nav, 'members' );
    620673
    621674                        // Sub nav items are not required.
    622                         if ( !empty( $sub_nav ) ) {
    623                                 foreach( (array) $sub_nav as $nav ) {
     675                        if ( $this->sub_nav ) {
     676                                foreach( (array) $this->sub_nav as $nav ) {
    624677                                        bp_core_new_subnav_item( $nav, 'members' );
    625678                                }
  • trunk/src/bp-members/bp-members-template.php

    r13441 r13442  
    19531953 *
    19541954 * @since 1.2.4
    1955  */
    1956 function bp_loggedin_user_link() {
    1957         echo esc_url( bp_loggedin_user_url() );
     1955 * @since 12.0.0 Introduced the `$chunk` argument.
     1956 *
     1957 * @param array $chunk A list of slugs to append to the URL.
     1958 */
     1959function bp_loggedin_user_link( $chunks = array() ) {
     1960        $path_chunks = array();
     1961        $chunks      = (array) $chunks;
     1962
     1963        if ( $chunks ) {
     1964                $single_item_component = array_shift( $chunks );
     1965                if ( $single_item_component ) {
     1966                        $path_chunks['single_item_component'] = bp_rewrites_get_slug( 'members', 'member_' . $single_item_component, $single_item_component );
     1967                }
     1968
     1969                $single_item_action = array_shift( $chunks );
     1970                if ( $single_item_action ) {
     1971                        $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $single_item_component . '_' . $single_item_action, $single_item_action );
     1972                }
     1973
     1974                if ( $chunks ) {
     1975                        foreach ( $chunks as $chunk ) {
     1976                                $path_chunks['single_item_action_variables'][] = bp_rewrites_get_slug( 'members', 'member_' . $single_item_component . '_' . $single_item_action . '_' . $chunk, $chunk );
     1977                        }
     1978                }
     1979        }
     1980
     1981        echo esc_url( bp_loggedin_user_url( $path_chunks ) );
    19581982}
    19591983
  • trunk/src/bp-members/classes/class-bp-members-component.php

    r13441 r13442  
    616616         */
    617617        public function get_avatar_cover_image_admin_navs( $admin_bar_menu_id = '' ) {
    618                 $wp_admin_nav = array();
    619                 $profile_link = trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() );
     618                $wp_admin_nav        = array();
     619                $profile_slug        = bp_get_profile_slug();
     620                $custom_profile_slug = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug );
    620621
    621622                if ( ! $admin_bar_menu_id ) {
     
    629630                                'id'       => 'my-account-' . $admin_bar_menu_id . '-change-avatar',
    630631                                'title'    => _x( 'Change Profile Photo', 'My Account Profile sub nav', 'buddypress' ),
    631                                 'href'     => trailingslashit( $profile_link . 'change-avatar' ),
    632                                 'position' => 30
     632                                'href'     => bp_loggedin_user_url(
     633                                        array(
     634                                                'single_item_component' => $custom_profile_slug,
     635                                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_change_avatar', 'change-avatar' ),
     636                                        )
     637                                ),
     638                                'position' => 30,
    633639                        );
    634640                }
     
    640646                                'id'       => 'my-account-' . $admin_bar_menu_id . '-change-cover-image',
    641647                                'title'    => _x( 'Change Cover Image', 'My Account Profile sub nav', 'buddypress' ),
    642                                 'href'     => trailingslashit( $profile_link . 'change-cover-image' ),
    643                                 'position' => 40
     648                                'href'     => bp_loggedin_user_url(
     649                                        array(
     650                                                'single_item_component' => $custom_profile_slug,
     651                                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_change_cover_image', 'change-cover-image' ),
     652                                        )
     653                                ),
     654                                'position' => 40,
    644655                        );
    645                 }
    646 
    647                 return $wp_admin_nav;
    648         }
    649 
    650         /**
    651          * Get the members invitations admin bar navs.
    652          *
    653          * @since 8.0.0
    654          *
    655          * @param  string $admin_bar_menu_id The Admin bar menu ID to attach sub items to.
    656          * @return array                     The members invitations admin navs.
    657          */
    658         public function get_members_invitations_admin_navs( $admin_bar_menu_id = '' ) {
    659                 $wp_admin_nav = array();
    660                 $invite_link  = trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() );
    661 
    662                 if ( ! $admin_bar_menu_id ) {
    663                         $admin_bar_menu_id = $this->id;
    664656                }
    665657
     
    677669                // Menus for logged in user.
    678670                if ( is_user_logged_in() ) {
    679                         $profile_link = trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() );
     671                        $profile_slug        = bp_get_profile_slug();
     672                        $custom_profile_slug = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug );
    680673
    681674                        if ( ! bp_is_active( 'xprofile' ) ) {
     
    685678                                        'id'     => 'my-account-' . $this->id,
    686679                                        'title'  => _x( 'Profile', 'My Account Profile', 'buddypress' ),
    687                                         'href'   => $profile_link
     680                                        'href'   => bp_loggedin_user_url(
     681                                                array(
     682                                                        'single_item_component' => $custom_profile_slug,
     683                                                )
     684                                        ),
    688685                                );
    689686
     
    693690                                        'id'       => 'my-account-' . $this->id . '-public',
    694691                                        'title'    => _x( 'View', 'My Account Profile sub nav', 'buddypress' ),
    695                                         'href'     => trailingslashit( $profile_link . 'public' ),
    696                                         'position' => 10
     692                                        'href'     => bp_loggedin_user_url(
     693                                                array(
     694                                                        'single_item_component' => $custom_profile_slug,
     695                                                        'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_public', 'public' ),
     696                                                )
     697                                        ),
     698                                        'position' => 10,
    697699                                );
    698700
  • trunk/src/bp-messages/actions/compose.php

    r13096 r13442  
    4444
    4545                // Setup the link to the logged-in user's messages.
    46                 $member_messages = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() );
     46                $message_slug        = bp_get_messages_slug();
     47                $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
     48                $path_chunks         = array(
     49                        'single_item_component' => $custom_message_slug,
     50                );
    4751
    4852                // Site-wide notice.
     
    5155                        // Attempt to save the notice and redirect to notices.
    5256                        if ( messages_send_notice( $_POST['subject'], $_POST['content'] ) ) {
    53                                 $success     = true;
    54                                 $feedback    = __( 'Notice successfully created.', 'buddypress' );
    55                                 $redirect_to = trailingslashit( $member_messages . 'notices' );
     57                                $success                           = true;
     58                                $feedback                          = __( 'Notice successfully created.', 'buddypress' );
     59                                $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices', 'notices' );
     60                                $redirect_to = bp_loggedin_user_url( $path_chunks );
    5661
    5762                        // Notice could not be sent.
     
    8893                        // Send the message and redirect to it.
    8994                        if ( true === is_int( $send ) ) {
    90                                 $success     = true;
    91                                 $feedback    = __( 'Message successfully sent.', 'buddypress' );
    92                                 $view        = trailingslashit( $member_messages . 'view' );
    93                                 $redirect_to = trailingslashit( $view . $send );
     95                                $success                                     = true;
     96                                $feedback                                    = __( 'Message successfully sent.', 'buddypress' );
     97                                $path_chunks['single_item_action']           = bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_view', 'view' );
     98                                $path_chunks['single_item_action_variables'] = array( $send );
     99                                $redirect_to                                 = bp_loggedin_user_url( $path_chunks );
    94100
    95101                        // Message could not be sent.
  • trunk/src/bp-messages/actions/notices.php

    r13096 r13442  
    8787
    8888        // Redirect.
    89         $member_notices = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() );
    90         $redirect_to    = trailingslashit( $member_notices . 'notices' );
     89        $message_slug        = bp_get_messages_slug();
     90        $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
     91        $redirect_to         = bp_loggedin_user_url(
     92                array(
     93                        'single_item_component' => $custom_message_slug,
     94                        'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices', 'notices' ),
     95                )
     96        );
    9197
    9298        bp_core_redirect( $redirect_to );
     
    132138
    133139        // Redirect.
    134         $redirect_to = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() );
     140        $message_slug        = bp_get_messages_slug();
     141        $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
     142        $redirect_to         = bp_loggedin_user_url(
     143                array(
     144                        'single_item_component' => $custom_message_slug,
     145                )
     146        );
    135147
    136148        bp_core_redirect( $redirect_to );
  • trunk/src/bp-messages/bp-messages-notifications.php

    r13395 r13442  
    2525 */
    2626function messages_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    27         $total_items = (int) $total_items;
    28         $text        = '';
    29         $link        = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/inbox' );
    30         $title       = __( 'Inbox', 'buddypress' );
    31         $amount      = 'single';
     27        $total_items         = (int) $total_items;
     28        $text                = '';
     29        $message_slug        = bp_get_messages_slug();
     30        $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
     31        $link                = bp_loggedin_user_url(
     32                array(
     33                        'single_item_component' => $custom_message_slug,
     34                        'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_inbox', 'inbox' ),
     35                )
     36        );
     37        $title               = __( 'Inbox', 'buddypress' );
     38        $amount              = 'single';
    3239
    3340        if ( 'new_message' === $action ) {
  • trunk/src/bp-messages/bp-messages-star.php

    r13433 r13442  
    114114                );
    115115
    116                 // Check user ID and determine base user URL.
    117                 switch ( $r['user_id'] ) {
    118 
    119                         // Current user.
    120                         case bp_loggedin_user_id() :
    121                                 $user_domain = bp_loggedin_user_domain();
    122                                 break;
    123 
    124                         // Displayed user.
    125                         case bp_displayed_user_id() :
    126                                 $user_domain = bp_displayed_user_domain();
    127                                 break;
    128 
    129                         // Empty or other.
    130                         default :
    131                                 $user_domain = bp_members_get_user_url( $r['user_id'] );
    132                                 break;
    133                 }
     116                // Check user ID and determine base user slug.
     117                $user_slug = bp_members_get_user_slug( $r['user_id'] );
    134118
    135119                // Bail if no user domain was calculated.
    136                 if ( empty( $user_domain ) ) {
     120                if ( empty( $user_slug ) ) {
    137121                        return '';
    138122                }
     123
     124                $message_slug        = bp_get_messages_slug();
     125                $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
     126                $path_chunks         = array(
     127                        'component_id'          => 'members',
     128                        'single_item'           => $user_slug,
     129                        'single_item_component' => $custom_message_slug,
     130                );
    139131
    140132                // Define local variables.
     
    183175
    184176                        if ( true === $is_starred ) {
    185                                 $action    = 'unstar';
    186                                 $bulk_attr = ' data-star-bulk="1"';
    187                                 $retval    = $user_domain . bp_get_messages_slug() . '/unstar/' . $message_id . '/' . $nonce . '/all/';
     177                                $action                                      = 'unstar';
     178                                $bulk_attr                                   = ' data-star-bulk="1"';
     179                                $path_chunks['single_item_action']           = bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_unstar', 'unstar' );
     180                                $path_chunks['single_item_action_variables'] = array( $message_id, $nonce, bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_all', 'all' ) );
    188181                        } else {
    189                                 $action    = 'star';
    190                                 $retval    = $user_domain . bp_get_messages_slug() . '/star/' . $message_id . '/' . $nonce . '/';
     182                                $action                                      = 'star';
     183                                $path_chunks['single_item_action']           = bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_star', 'star' );
     184                                $path_chunks['single_item_action_variables'] = array( $message_id, $nonce );
    191185                        }
    192186
     
    200194
    201195                        if ( true === $is_starred ) {
    202                                 $action = 'unstar';
    203                                 $retval = $user_domain . bp_get_messages_slug() . '/unstar/' . $message_id . '/' . $nonce . '/';
     196                                $action                                      = 'unstar';
     197                                $path_chunks['single_item_action']           = bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_unstar', 'unstar' );
     198                                $path_chunks['single_item_action_variables'] = array( $message_id, $nonce );
    204199                        } else {
    205                                 $action = 'star';
    206                                 $retval = $user_domain . bp_get_messages_slug() . '/star/' . $message_id . '/' . $nonce . '/';
     200                                $action                                      = 'star';
     201                                $path_chunks['single_item_action']           = bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_star', 'star' );
     202                                $path_chunks['single_item_action_variables'] = array( $message_id, $nonce );
    207203                        }
    208204
    209205                        $title = $r["title_{$action}"];
    210206                }
     207
     208                $url = bp_rewrites_get_url( $path_chunks );
    211209
    212210                /**
     
    215213                 * @since 2.3.0
    216214                 *
    217                  * @param string $retval URL for starring / unstarring a message.
    218                  * @param array  $r      Parsed link arguments. See $args in bp_get_the_message_star_action_link().
     215                 * @param string $url URL for starring / unstarring a message.
     216                 * @param array  $r   Parsed link arguments. See $args in bp_get_the_message_star_action_link().
    219217                 */
    220                 $retval = esc_url( apply_filters( 'bp_get_the_message_star_action_urlonly', $retval, $r ) );
     218                $retval = esc_url( apply_filters( 'bp_get_the_message_star_action_urlonly', $url, $r ) );
    221219                if ( true === (bool) $r['url_only'] ) {
    222220                        return $retval;
  • trunk/src/bp-messages/bp-messages-template.php

    r13436 r13442  
    13351335                global $messages_template;
    13361336
     1337                $message_slug        = bp_get_messages_slug();
     1338                $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
     1339                $url                 = wp_nonce_url(
     1340                        bp_loggedin_user_url(
     1341                                array(
     1342                                        'single_item_component'        => $custom_message_slug,
     1343                                        'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices', 'notices' ),
     1344                                        'single_item_action_variables' => array(
     1345                                                bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices_delete', 'delete' ),
     1346                                                $messages_template->thread->id,
     1347                                        ),
     1348                                )
     1349                        ),
     1350                        'messages_delete_notice'
     1351                );
     1352
    13371353                /**
    13381354                 * Filters the URL for deleting the current notice.
     
    13401356                 * @since 1.0.0
    13411357                 *
    1342                  * @param string $value URL for deleting the current notice.
    1343                  * @param string $value Text indicating action being executed.
    1344                  */
    1345                 return apply_filters( 'bp_get_message_notice_delete_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/delete/' . $messages_template->thread->id ), 'messages_delete_notice' ) );
     1358                 * @param string $url   URL for deleting the current notice.
     1359                 */
     1360                return apply_filters( 'bp_get_message_notice_delete_link', $url );
    13461361        }
    13471362
     
    13621377                global $messages_template;
    13631378
     1379                $message_slug        = bp_get_messages_slug();
     1380                $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
     1381                $path_chunks         = array(
     1382                        'single_item_component' => $custom_message_slug,
     1383                        'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices', 'notices' ),
     1384                );
     1385
    13641386                if ( 1 === (int) $messages_template->thread->is_active ) {
    1365                         $link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/deactivate/' . $messages_template->thread->id ), 'messages_deactivate_notice' );
     1387                        $nonce                                       = 'messages_deactivate_notice';
     1388                        $path_chunks['single_item_action_variables'] = array(
     1389                                bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices_deactivate', 'deactivate' ),
     1390                                $messages_template->thread->id,
     1391                        );
    13661392                } else {
    1367                         $link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/activate/' . $messages_template->thread->id ), 'messages_activate_notice' );
     1393                        $nonce                                       = 'messages_activate_notice';
     1394                        $path_chunks['single_item_action_variables'] = array(
     1395                                bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices_activate', 'activate' ),
     1396                                $messages_template->thread->id,
     1397                        );
    13681398                }
     1399
     1400                $link = wp_nonce_url( bp_loggedin_user_url( $path_chunks ), $nonce );
    13691401
    13701402                /**
     
    14251457         */
    14261458        function bp_get_message_notice_dismiss_link() {
    1427 
    1428                 $link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/dismiss/' ), 'messages_dismiss_notice' );
     1459                $message_slug        = bp_get_messages_slug();
     1460                $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
     1461                $link                = wp_nonce_url(
     1462                        bp_loggedin_user_url(
     1463                                array(
     1464                                        'single_item_component'        => $custom_message_slug,
     1465                                        'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices', 'notices' ),
     1466                                        'single_item_action_variables' => array( bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices_dismiss', 'dismiss' ) ),
     1467                                )
     1468                        ),
     1469                        'messages_dismiss_notice'
     1470                );
    14291471
    14301472                /**
     
    15131555                }
    15141556
     1557                $message_slug        = bp_get_messages_slug();
     1558                $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
     1559                $url                 = wp_nonce_url(
     1560                        add_query_arg(
     1561                                'r',
     1562                                bp_members_get_user_slug( bp_displayed_user_id() ),
     1563                                bp_loggedin_user_url(
     1564                                        array(
     1565                                                'single_item_component' => $custom_message_slug,
     1566                                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_compose', 'compose' ),
     1567                                        )
     1568                                )
     1569
     1570                        )
     1571                );
     1572
    15151573                /**
    15161574                 * Filters the URL for the Private Message link in member profile headers.
     
    15181576                 * @since 1.2.10
    15191577                 *
    1520                  * @param string $value URL for the Private Message link in member profile headers.
    1521                  */
    1522                 return apply_filters( 'bp_get_send_private_message_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_members_get_user_slug( bp_displayed_user_id() ) ) );
     1578                 * @param string $url URL for the Private Message link in member profile headers.
     1579                 */
     1580                return apply_filters( 'bp_get_send_private_message_link', $url );
    15231581        }
    15241582
  • trunk/src/bp-messages/classes/class-bp-messages-component.php

    r13441 r13442  
    295295                // Menus for logged in user.
    296296                if ( is_user_logged_in() ) {
    297 
    298                         // Setup the logged in user variables.
    299                         $messages_link = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() );
     297                        $message_slug        = bp_get_messages_slug();
     298                        $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
    300299
    301300                        // Unread message count.
     
    322321                                'id'     => 'my-account-' . $this->id,
    323322                                'title'  => $title,
    324                                 'href'   => $messages_link
     323                                'href'   => bp_loggedin_user_url(
     324                                        array(
     325                                                'single_item_component' => $custom_message_slug,
     326                                        )
     327                                ),
    325328                        );
    326329
     
    330333                                'id'       => 'my-account-' . $this->id . '-inbox',
    331334                                'title'    => $inbox,
    332                                 'href'     => trailingslashit( $messages_link . 'inbox' ),
    333                                 'position' => 10
     335                                'href'     => bp_loggedin_user_url(
     336                                        array(
     337                                                'single_item_component' => $custom_message_slug,
     338                                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_inbox', 'inbox' ),
     339                                        )
     340                                ),
     341                                'position' => 10,
    334342                        );
    335343
    336344                        // Starred.
    337345                        if ( bp_is_active( $this->id, 'star' ) ) {
     346                                $star_slug      = bp_get_messages_starred_slug();
    338347                                $wp_admin_nav[] = array(
    339348                                        'parent'   => 'my-account-' . $this->id,
    340349                                        'id'       => 'my-account-' . $this->id . '-starred',
    341350                                        'title'    => __( 'Starred', 'buddypress' ),
    342                                         'href'     => trailingslashit( $messages_link . bp_get_messages_starred_slug() ),
    343                                         'position' => 11
     351                                        'href'     => bp_loggedin_user_url(
     352                                                array(
     353                                                        'single_item_component' => $custom_message_slug,
     354                                                        'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_' . $star_slug, $star_slug ),
     355                                                )
     356                                        ),
     357                                        'position' => 11,
    344358                                );
    345359                        }
     
    350364                                'id'       => 'my-account-' . $this->id . '-sentbox',
    351365                                'title'    => __( 'Sent', 'buddypress' ),
    352                                 'href'     => trailingslashit( $messages_link . 'sentbox' ),
    353                                 'position' => 20
     366                                'href'     => bp_loggedin_user_url(
     367                                        array(
     368                                                'single_item_component' => $custom_message_slug,
     369                                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_sentbox', 'sentbox' ),
     370                                        )
     371                                ),
     372                                'position' => 20,
    354373                        );
    355374
     
    359378                                'id'       => 'my-account-' . $this->id . '-compose',
    360379                                'title'    => __( 'Compose', 'buddypress' ),
    361                                 'href'     => trailingslashit( $messages_link . 'compose' ),
    362                                 'position' => 30
     380                                'href'     => bp_loggedin_user_url(
     381                                        array(
     382                                                'single_item_component' => $custom_message_slug,
     383                                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_compose', 'compose' ),
     384                                        )
     385                                ),
     386                                'position' => 30,
    363387                        );
    364388
     
    369393                                        'id'       => 'my-account-' . $this->id . '-notices',
    370394                                        'title'    => __( 'Site Notices', 'buddypress' ),
    371                                         'href'     => trailingslashit( $messages_link . 'notices' ),
    372                                         'position' => 90
     395                                        'href'     => bp_loggedin_user_url(
     396                                                array(
     397                                                        'single_item_component' => $custom_message_slug,
     398                                                        'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices', 'notices' ),
     399                                                )
     400                                        ),
     401                                        'position' => 90,
    373402                                );
    374403                        }
  • trunk/src/bp-messages/screens/view.php

    r13395 r13442  
    2222        }
    2323
    24         $thread_id = (int) bp_action_variable( 0 );
     24        $thread_id           = (int) bp_action_variable( 0 );
     25        $message_slug        = bp_get_messages_slug();
     26        $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug );
    2527
    2628        if ( empty( $thread_id ) || ! messages_is_valid_thread( $thread_id ) ) {
     
    2931                }
    3032
    31                 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() ) );
     33                bp_core_redirect(
     34                        bp_loggedin_user_url(
     35                                array(
     36                                        'single_item_component' => $custom_message_slug,
     37                                )
     38                        )
     39                );
    3240        }
    3341
     
    4250                } else {
    4351                        bp_core_add_message( __( 'You do not have access to that conversation.', 'buddypress' ), 'error' );
    44                         bp_core_redirect( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() ) );
     52
     53                        bp_core_redirect(
     54                                bp_loggedin_user_url(
     55                                        array(
     56                                                'single_item_component' => $custom_message_slug,
     57                                        )
     58                                )
     59                        );
    4560                }
    4661        }
  • trunk/src/bp-notifications/bp-notifications-adminbar.php

    r13395 r13442  
    3333        $alert_class   = (int) $count > 0 ? 'pending-count alert' : 'count no-alert';
    3434        $menu_title    = '<span id="ab-pending-notifications" class="' . $alert_class . '">' . number_format_i18n( $count ) . '</span>';
    35         $menu_link     = trailingslashit( bp_loggedin_user_domain() . bp_get_notifications_slug() );
     35        $notifications_slug        = bp_get_notifications_slug();
     36        $custom_notifications_slug = bp_rewrites_get_slug( 'members', 'member_' . $notifications_slug, $notifications_slug );
     37        $menu_link                 = bp_loggedin_user_url(
     38                array(
     39                        'single_item_component' => $custom_notifications_slug,
     40                )
     41        );
    3642
    3743        // Add the top-level Notifications button.
  • trunk/src/bp-notifications/bp-notifications-functions.php

    r13395 r13442  
    235235                                if ( is_string( $content ) ) {
    236236                                        $notification_object->content = $content;
    237                                         $notification_object->href    = bp_loggedin_user_domain();
     237                                        $notification_object->href    = bp_loggedin_user_url();
    238238                                } else {
    239239                                        $notification_object->content = isset( $content['text'] ) ? $content['text'] : '';
     
    303303                                if ( is_string( $content ) ) {
    304304                                        $notification_object->content = $content;
    305                                         $notification_object->href    = bp_loggedin_user_domain();
     305                                        $notification_object->href    = bp_loggedin_user_url();
    306306                                } else {
    307307                                        $notification_object->content = $content['text'];
  • trunk/src/bp-notifications/classes/class-bp-notifications-component.php

    r13441 r13442  
    221221                // Menus for logged in user.
    222222                if ( is_user_logged_in() ) {
    223 
    224                         // Setup the logged in user variables.
    225                         $notifications_link = trailingslashit( bp_loggedin_user_domain() . bp_get_notifications_slug() );
     223                        $notifications_slug        = bp_get_notifications_slug();
     224                        $custom_notifications_slug = bp_rewrites_get_slug( 'members', 'member_' . $notifications_slug, $notifications_slug );
    226225
    227226                        // Pending notification requests.
     
    248247                                'id'     => 'my-account-' . $this->id,
    249248                                'title'  => $title,
    250                                 'href'   => $notifications_link,
     249                                'href'   => bp_loggedin_user_url(
     250                                        array(
     251                                                'single_item_component' => $custom_notifications_slug,
     252                                        )
     253                                ),
    251254                        );
    252255
     
    256259                                'id'       => 'my-account-' . $this->id . '-unread',
    257260                                'title'    => $unread,
    258                                 'href'     => trailingslashit( $notifications_link . 'unread' ),
     261                                'href'     => bp_loggedin_user_url(
     262                                        array(
     263                                                'single_item_component' => $custom_notifications_slug,
     264                                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $notifications_slug . '_unread', 'unread' ),
     265                                        )
     266                                ),
    259267                                'position' => 10,
    260268                        );
     
    265273                                'id'       => 'my-account-' . $this->id . '-read',
    266274                                'title'    => _x( 'Read', 'My Account Notification sub nav', 'buddypress' ),
    267                                 'href'     => trailingslashit( $notifications_link . 'read' ),
     275                                'href'     => bp_loggedin_user_url(
     276                                        array(
     277                                                'single_item_component' => $custom_notifications_slug,
     278                                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $notifications_slug . '_read', 'read' ),
     279                                        )
     280                                ),
    268281                                'position' => 20,
    269282                        );
  • trunk/src/bp-settings/classes/class-bp-settings-component.php

    r13441 r13442  
    235235                // Menus for logged in user.
    236236                if ( is_user_logged_in() ) {
    237 
    238                         // Setup the logged in user variables.
    239                         $settings_link = trailingslashit( bp_loggedin_user_domain() . bp_get_settings_slug() );
     237                        $settings_slug        = bp_get_settings_slug();
     238                        $custom_settings_slug = bp_rewrites_get_slug( 'members', 'member_' . $settings_slug, $settings_slug );
    240239
    241240                        // Add main Settings menu.
     
    244243                                'id'     => 'my-account-' . $this->id,
    245244                                'title'  => __( 'Settings', 'buddypress' ),
    246                                 'href'   => $settings_link,
     245                                'href'   => bp_loggedin_user_url(
     246                                        array(
     247                                                'single_item_component' => $custom_settings_slug,
     248                                        )
     249                                ),
    247250                        );
    248251
     
    252255                                'id'       => 'my-account-' . $this->id . '-general',
    253256                                'title'    => __( 'General', 'buddypress' ),
    254                                 'href'     => trailingslashit( $settings_link . 'general' ),
     257                                'href'     => bp_loggedin_user_url(
     258                                        array(
     259                                                'single_item_component' => $custom_settings_slug,
     260                                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug . '_general', 'general' ),
     261                                        )
     262                                ),
    255263                                'position' => 10,
    256264                        );
     
    262270                                        'id'       => 'my-account-' . $this->id . '-notifications',
    263271                                        'title'    => __( 'Email', 'buddypress' ),
    264                                         'href'     => trailingslashit( $settings_link . 'notifications' ),
     272                                        'href'     => bp_loggedin_user_url(
     273                                                array(
     274                                                        'single_item_component' => $custom_settings_slug,
     275                                                        'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug . '_notifications', 'notifications' ),
     276                                                )
     277                                        ),
    265278                                        'position' => 20,
    266279                                );
     
    276289                                        'id'       => 'my-account-' . $this->id . '-data',
    277290                                        'title'    => __( 'Export Data', 'buddypress' ),
    278                                         'href'     => trailingslashit( $settings_link . 'data' ),
     291                                        'href'     => bp_loggedin_user_url(
     292                                                array(
     293                                                        'single_item_component' => $custom_settings_slug,
     294                                                        'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug . '_data', 'data' ),
     295                                                )
     296                                        ),
    279297                                        'position' => 89,
    280298                                );
     
    287305                                        'id'       => 'my-account-' . $this->id . '-delete-account',
    288306                                        'title'    => __( 'Delete Account', 'buddypress' ),
    289                                         'href'     => trailingslashit( $settings_link . 'delete-account' ),
     307                                        'href'     => bp_loggedin_user_url(
     308                                                array(
     309                                                        'single_item_component' => $custom_settings_slug,
     310                                                        'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug . '_delete_account', 'delete-account' ),
     311                                                )
     312                                        ),
    290313                                        'position' => 90,
    291314                                );
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r13437 r13442  
    77 * @package BuddyPress
    88 * @subpackage BP_Theme_Compat
    9  * @version 10.0.0
     9 * @version 12.0.0
    1010 */
    1111
     
    908908
    909909        $scope = '';
    910         if ( ! empty( $_POST['scope'] ) )
     910        if ( ! empty( $_POST['scope'] ) ) {
    911911                $scope = $_POST['scope'];
     912        }
     913
     914        $activity_slug        = bp_get_activity_slug();
     915        $custom_activity_slug = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug, $activity_slug );
    912916
    913917        // We need to calculate and return the feed URL for each scope.
    914918        switch ( $scope ) {
    915919                case 'friends':
    916                         $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/friends/feed/';
     920                        $feed_url = bp_loggedin_user_url(
     921                                array(
     922                                        'single_item_component'        => $custom_activity_slug,
     923                                        'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_friends', 'friends' ),
     924                                        'single_item_action_variables' => array( 'feed' ),
     925                                )
     926                        );
    917927                        break;
    918928                case 'groups':
    919                         $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/groups/feed/';
     929                        $feed_url = bp_loggedin_user_url(
     930                                array(
     931                                        'single_item_component'        => $custom_activity_slug,
     932                                        'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_groups', 'groups' ),
     933                                        'single_item_action_variables' => array( 'feed' ),
     934                                )
     935                        );
    920936                        break;
    921937                case 'favorites':
    922                         $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/feed/';
     938                        $feed_url = bp_loggedin_user_url(
     939                                array(
     940                                        'single_item_component'        => $custom_activity_slug,
     941                                        'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_favorites', 'favorites' ),
     942                                        'single_item_action_variables' => array( 'feed' ),
     943                                )
     944                        );
    923945                        break;
    924946                case 'mentions':
    925                         $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/feed/';
     947                        $feed_url = bp_loggedin_user_url(
     948                                array(
     949                                        'single_item_component'        => $custom_activity_slug,
     950                                        'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_mentions', 'mentions' ),
     951                                        'single_item_action_variables' => array( 'feed' ),
     952                                )
     953                        );
    926954
    927955                        if ( isset( $_POST['_wpnonce_activity_filter'] ) && wp_verify_nonce( wp_unslash( $_POST['_wpnonce_activity_filter'] ), 'activity_filter' ) ) {
     
    14541482        }
    14551483
     1484        $friends_slug        = bp_get_friends_slug();
     1485        $custom_friends_slug = bp_rewrites_get_slug( 'members', 'member_' . $friends_slug, $friends_slug );
     1486
    14561487        // Trying to cancel friendship.
    14571488        if ( 'is_friend' == BP_Friends_Friendship::check_is_friend( bp_loggedin_user_id(), $friend_id ) ) {
     
    14611492                        echo __( 'Friendship could not be canceled.', 'buddypress' );
    14621493                } else {
    1463                         echo '<a id="friend-' . esc_attr( $friend_id ) . '" class="friendship-button not_friends add" rel="add" href="' . wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/add-friend/' . $friend_id, 'friends_add_friend' ) . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';
     1494                        $url = bp_loggedin_user_url(
     1495                                array(
     1496                                        'single_item_component'        => $custom_friends_slug,
     1497                                        'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $friends_slug . '_add_friend', 'add-friend' ),
     1498                                        'single_item_action_variables' => array( $friend_id ),
     1499                                )
     1500                        );
     1501                        echo '<a id="friend-' . esc_attr( $friend_id ) . '" class="friendship-button not_friends add" rel="add" href="' . wp_nonce_url( $url, 'friends_add_friend' ) . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';
    14641502                }
    14651503
     
    14711509                        echo __(' Friendship could not be requested.', 'buddypress' );
    14721510                } else {
    1473                         echo '<a id="friend-' . esc_attr( $friend_id ) . '" class="remove friendship-button pending_friend requested" rel="remove" href="' . wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/cancel/' . $friend_id . '/', 'friends_withdraw_friendship' ) . '" class="requested">' . __( 'Cancel Friendship Request', 'buddypress' ) . '</a>';
     1511                        $url = bp_loggedin_user_url(
     1512                                array(
     1513                                        'single_item_component'        => $custom_friends_slug,
     1514                                        'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $friends_slug . '_requests', 'requests' ),
     1515                                        'single_item_action_variables' => array(
     1516                                                bp_rewrites_get_slug( 'members', 'member_' . $friends_slug . '_requests_cancel', 'cancel' ),
     1517                                                $friend_id,
     1518                                        ),
     1519                                )
     1520                        );
     1521                        echo '<a id="friend-' . esc_attr( $friend_id ) . '" class="remove friendship-button pending_friend requested" rel="remove" href="' . wp_nonce_url( $url, 'friends_withdraw_friendship' ) . '" class="requested">' . __( 'Cancel Friendship Request', 'buddypress' ) . '</a>';
    14741522                }
    14751523
     
    14791527
    14801528                if ( friends_withdraw_friendship( bp_loggedin_user_id(), $friend_id ) ) {
    1481                         echo '<a id="friend-' . esc_attr( $friend_id ) . '" class="friendship-button not_friends add" rel="add" href="' . wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/add-friend/' . $friend_id, 'friends_add_friend' ) . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';
     1529                        $url = bp_loggedin_user_url(
     1530                                array(
     1531                                        'single_item_component'        => $custom_friends_slug,
     1532                                        'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $friends_slug . '_add_friend', 'add-friend' ),
     1533                                        'single_item_action_variables' => array(
     1534                                                $friend_id,
     1535                                        ),
     1536                                )
     1537                        );
     1538                        echo '<a id="friend-' . esc_attr( $friend_id ) . '" class="friendship-button not_friends add" rel="add" href="' . wp_nonce_url( $url, 'friends_add_friend' ) . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';
    14821539                } else {
    14831540                        echo __("Friendship request could not be cancelled.", 'buddypress');
  • trunk/src/bp-templates/bp-legacy/buddypress/activity/index.php

    r12907 r13442  
    77 * @package BuddyPress
    88 * @subpackage bp-legacy
    9  * @version 3.0.0
     9 * @version 12.0.0
    1010 */
    1111
     
    8282
    8383                                                <li id="activity-friends">
    84                                                         <a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>">
     84                                                        <a href="<?php bp_loggedin_user_link( array( bp_get_activity_slug(), bp_get_friends_slug() ) ); ?>">
    8585                                                                <?php
    8686                                                                /* translators: %s: number of friends */
    87                                                                 printf( __( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' );
     87                                                                printf( esc_html__( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' );
    8888                                                                ?>
    8989                                                        </a>
     
    107107                                        <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
    108108
    109                                                 <?php
    110                                                 printf(
    111                                                         '<li id="activity-groups"><a href="%1$s">%2$s</a></li>',
    112                                                         esc_url( bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/' ),
    113                                                         sprintf(
     109                                                <li id="activity-groups">
     110                                                        <a href="<?php bp_loggedin_user_link( array( bp_get_activity_slug(), bp_get_groups_slug() ) ); ?>">
     111                                                                <?php
    114112                                                                /* translators: %s: current user groups count */
    115                                                                 __( 'My Groups %s', 'buddypress' ),
    116                                                                 '<span>' . bp_get_total_group_count_for_user( bp_loggedin_user_id() ) . '</span>'
    117                                                         )
    118                                                 );
    119                                                 ?>
     113                                                                printf( esc_html__( 'My Groups %s', 'buddypress' ), '<span>' . bp_get_total_group_count_for_user( bp_loggedin_user_id() ) . '</span>' );
     114                                                                ?>
     115                                                        </a>
     116                                                </li>
    120117
    121118                                        <?php endif; ?>
     
    135132
    136133                                        <li id="activity-favorites">
    137                                                 <a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>">
     134                                                <a href="<?php bp_loggedin_user_link( array( bp_get_activity_slug(), 'favorites' ) ); ?>">
    138135                                                        <?php
    139136                                                        /* translators: %s: number of favorites */
    140                                                         printf( __( 'My Favorites %s', 'buddypress' ), '<span>' . bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) . '</span>' );
     137                                                        printf( esc_html__( 'My Favorites %s', 'buddypress' ), '<span>' . bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) . '</span>' );
    141138                                                        ?>
    142139                                                </a>
     
    157154
    158155                                        <li id="activity-mentions">
    159                                                 <a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>">
    160                                                         <?php _e( 'Mentions', 'buddypress' ); ?>
     156                                                <a href="<?php bp_loggedin_user_link( array( bp_get_activity_slug(), 'mentions' ) ); ?>">
     157                                                        <?php esc_html_e( 'Mentions', 'buddypress' ); ?>
    161158                                                        <?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?>
    162159                                                                &nbsp;
     
    165162                                                                                <?php
    166163                                                                                /* translators: %s: new mentions count */
    167                                                                                 printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) );
     164                                                                                printf( esc_html( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) );
    168165                                                                                ?>
    169166                                                                        </span>
  • trunk/src/bp-templates/bp-legacy/buddypress/activity/post-form.php

    r12595 r13442  
    55 * @package BuddyPress
    66 * @subpackage bp-legacy
    7  * @version 3.0.0
     7 * @version 12.0.0
    88 */
    99
     
    2222
    2323        <div id="whats-new-avatar">
    24                 <a href="<?php echo bp_loggedin_user_domain(); ?>">
     24                <a href="<?php bp_loggedin_user_link(); ?>">
    2525                        <?php bp_loggedin_user_avatar( 'width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height() ); ?>
    2626                </a>
  • trunk/src/bp-templates/bp-legacy/buddypress/blogs/index.php

    r13033 r13442  
    55 * @package BuddyPress
    66 * @subpackage bp-legacy
    7  * @version 10.0.0
     7 * @version 12.0.0
    88 */
    99
     
    7272
    7373                                        <li id="blogs-personal">
    74                                                 <a href="<?php echo bp_loggedin_user_domain() . bp_get_blogs_slug(); ?>">
     74                                                <a href="<?php bp_loggedin_user_link( array( bp_get_blogs_slug() ) ); ?>">
    7575                                                        <?php
    7676                                                        /* translators: %s: current user blogs count */
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/index.php

    r13437 r13442  
    7171                                <?php if ( is_user_logged_in() && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
    7272                                        <li id="groups-personal">
    73                                                 <a href="<?php echo bp_loggedin_user_domain() . bp_get_groups_slug() . '/my-groups/'; ?>">
     73                                                <a href="<?php bp_loggedin_user_link( array( bp_get_groups_slug(), 'my-groups' ) ); ?>">
    7474                                                        <?php
    7575                                                        /* translators: %s: current user groups count */
  • trunk/src/bp-templates/bp-legacy/buddypress/members/index.php

    r12082 r13442  
    55 * @package BuddyPress
    66 * @subpackage bp-legacy
    7  * @version 3.0.0
     7 * @version 12.0.0
    88 */
    99
     
    6363
    6464                                <?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
    65                                         <li id="members-personal"><a href="<?php echo esc_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/' ); ?>"><?php printf( __( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' ); ?></a></li>
     65                                        <li id="members-personal"><a href="<?php bp_loggedin_user_link( array( bp_get_friends_slug(), 'my-friends' ) ); ?>"><?php printf( __( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' ); ?></a></li>
    6666                                <?php endif; ?>
    6767
  • trunk/src/bp-templates/bp-nouveau/includes/activity/ajax.php

    r13433 r13442  
    44 *
    55 * @since 3.0.0
    6  * @version 10.0.0
     6 * @version 12.0.0
    77 */
    88
     
    115115
    116116                        if ( 1 === $fav_count ) {
     117                                $activity_slug          = bp_nouveau_get_component_slug( 'activity' );
     118                                $custom_activity_slug   = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug, $activity_slug );
     119                                $activity_favorites_url = bp_loggedin_user_url(
     120                                        array(
     121                                                'single_item_component' => $custom_activity_slug,
     122                                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_favorites', 'favorites' ),
     123                                        )
     124                                );
     125
    117126                                $response['directory_tab'] = '<li id="activity-favorites" data-bp-scope="favorites" data-bp-object="activity">
    118                                         <a href="' . bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/favorites/">
     127                                        <a href="' . esc_url( $activity_favorites_url ). '">
    119128                                                ' . esc_html__( 'My Favorites', 'buddypress' ) . '
    120129                                        </a>
  • trunk/src/bp-templates/bp-nouveau/includes/activity/functions.php

    r12908 r13442  
    44 *
    55 * @since 3.0.0
    6  * @version 8.0.0
     6 * @version 12.0.0
    77 */
    88
     
    8888                        'avatar_width'  => $width,
    8989                        'avatar_height' => $height,
    90                         'user_domain'   => bp_loggedin_user_domain(),
     90                        'user_domain'   => bp_loggedin_user_url(),
    9191                        'avatar_alt'    => sprintf(
    9292                                /* translators: %s: member name */
     
    220220                        )
    221221                );
     222                $activity_slug = bp_nouveau_get_component_slug( 'activity' );
     223                $path_chunks   = array(
     224                        'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug, $activity_slug ),
     225                );
    222226
    223227                // If the user has favorite create a nav item
    224228                if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) {
     229                        $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_favorites', 'favorites' );
     230
    225231                        $nav_items['favorites'] = array(
    226232                                'component' => 'activity',
    227233                                'slug'      => 'favorites', // slug is used because BP_Core_Nav requires it, but it's the scope
    228234                                'li_class'  => array(),
    229                                 'link'      => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/favorites/',
     235                                'link'      => bp_loggedin_user_url( $path_chunks ),
    230236                                'text'      => __( 'My Favorites', 'buddypress' ),
    231237                                'count'     => false,
     
    236242                // The friends component is active and user has friends
    237243                if ( bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) {
     244                        $friends_slug                      = bp_nouveau_get_component_slug( 'friends' );
     245                        $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_' . $friends_slug, $friends_slug );
     246
    238247                        $nav_items['friends'] = array(
    239248                                'component' => 'activity',
    240249                                'slug'      => 'friends', // slug is used because BP_Core_Nav requires it, but it's the scope
    241250                                'li_class'  => array( 'dynamic' ),
    242                                 'link'      => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/' . bp_nouveau_get_component_slug( 'friends' ) . '/',
     251                                'link'      =>  bp_loggedin_user_url( $path_chunks ),
    243252                                'text'      => __( 'My Friends', 'buddypress' ),
    244253                                'count'     => '',
     
    249258                // The groups component is active and user has groups
    250259                if ( bp_is_active( 'groups' ) && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) {
     260                        $groups_slug                       = bp_nouveau_get_component_slug( 'groups' );
     261                        $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_' . $groups_slug, $groups_slug );
     262
    251263                        $nav_items['groups'] = array(
    252264                                'component' => 'activity',
    253265                                'slug'      => 'groups', // slug is used because BP_Core_Nav requires it, but it's the scope
    254266                                'li_class'  => array( 'dynamic' ),
    255                                 'link'      => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/' . bp_nouveau_get_component_slug( 'groups' ) . '/',
     267                                'link'      => bp_loggedin_user_url( $path_chunks ),
    256268                                'text'      => __( 'My Groups', 'buddypress' ),
    257269                                'count'     => '',
     
    262274                // Mentions are allowed
    263275                if ( bp_activity_do_mentions() ) {
    264                         $deprecated_hooks[] = array( 'bp_before_activity_type_tab_mentions', 'activity', 36 );
     276                        $deprecated_hooks[]                = array( 'bp_before_activity_type_tab_mentions', 'activity', 36 );
     277                        $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_mentions', 'mentions' );
    265278
    266279                        $count = '';
     
    273286                                'slug'      => 'mentions', // slug is used because BP_Core_Nav requires it, but it's the scope
    274287                                'li_class'  => array( 'dynamic' ),
    275                                 'link'      => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/mentions/',
     288                                'link'      => bp_loggedin_user_url( $path_chunks ),
    276289                                'text'      => __( 'Mentions', 'buddypress' ),
    277290                                'count'     => $count,
  • trunk/src/bp-templates/bp-nouveau/includes/ajax.php

    r13136 r13442  
    44 *
    55 * @since 3.0.0
    6  * @version 10.0.0
     6 * @version 12.0.0
    77 */
    88
     
    5454                }
    5555
     56                $activity_slug        = bp_nouveau_get_component_slug( 'activity' );
     57                $custom_activity_slug = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug, $activity_slug );
     58
    5659                // We need to calculate and return the feed URL for each scope.
    5760                switch ( $scope ) {
    5861                        case 'friends':
    59                                 $feed_url = bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/friends/feed/';
     62                                $feed_url = bp_loggedin_user_url(
     63                                        array(
     64                                                'single_item_component'        => $custom_activity_slug,
     65                                                'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_friends', 'friends' ),
     66                                                'single_item_action_variables' => array( 'feed' ),
     67                                        )
     68                                );
    6069                                break;
    6170                        case 'groups':
    62                                 $feed_url = bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/groups/feed/';
     71                                $feed_url = bp_loggedin_user_url(
     72                                        array(
     73                                                'single_item_component'        => $custom_activity_slug,
     74                                                'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_groups', 'groups' ),
     75                                                'single_item_action_variables' => array( 'feed' ),
     76                                        )
     77                                );
    6378                                break;
    6479                        case 'favorites':
    65                                 $feed_url = bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/favorites/feed/';
     80                                $feed_url = bp_loggedin_user_url(
     81                                        array(
     82                                                'single_item_component'        => $custom_activity_slug,
     83                                                'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_favorites', 'favorites' ),
     84                                                'single_item_action_variables' => array( 'feed' ),
     85                                        )
     86                                );
    6687                                break;
    6788                        case 'mentions':
    68                                 $feed_url = bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/mentions/feed/';
     89                                $feed_url = bp_loggedin_user_url(
     90                                        array(
     91                                                'single_item_component'        => $custom_activity_slug,
     92                                                'single_item_action'           => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_mentions', 'mentions' ),
     93                                                'single_item_action_variables' => array( 'feed' ),
     94                                        )
     95                                );
    6996
    7097                                // Get user new mentions
  • trunk/src/bp-templates/bp-nouveau/includes/blogs/functions.php

    r13436 r13442  
    2828        if ( is_user_logged_in() ) {
    2929                $my_blogs_count = bp_get_total_blog_count_for_user( bp_loggedin_user_id() );
     30                $blogs_slug     = bp_nouveau_get_component_slug( 'blogs' );
     31                $path_chunks    = array(
     32                        'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $blogs_slug, $blogs_slug ),
     33                );
    3034
    3135                // If the user has blogs create a nav item
     
    3539                                'slug'      => 'personal', // slug is used because BP_Core_Nav requires it, but it's the scope
    3640                                'li_class'  => array(),
    37                                 'link'      => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'blogs' ),
     41                                'link'      => bp_loggedin_user_url( $path_chunks ),
    3842                                'text'      => __( 'My Sites', 'buddypress' ),
    3943                                'count'     => $my_blogs_count,
  • trunk/src/bp-templates/bp-nouveau/includes/groups/functions.php

    r13441 r13442  
    44 *
    55 * @since 3.0.0
    6  * @version 10.0.0
     6 * @version 12.0.0
    77 */
    88
     
    457457function bp_nouveau_groups_invites_restriction_admin_nav( $wp_admin_nav ) {
    458458        // Setup the logged in user variables.
    459         $settings_link = trailingslashit( bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'settings' ) );
     459        $settings_slug = bp_nouveau_get_component_slug( 'settings' );
    460460
    461461        // Add the "Group Invites" subnav item.
     
    464464                'id'     => 'my-account-' . buddypress()->settings->id . '-invites',
    465465                'title'  => _x( 'Group Invites', 'Group invitations main menu title', 'buddypress' ),
    466                 'href'   => trailingslashit( $settings_link . 'invites/' ),
     466                'href'   => bp_loggedin_user_url(
     467                        array(
     468                                'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug, $settings_slug ),
     469                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug . '_invites', 'invites' ),
     470                        )
     471                ),
    467472        );
    468473
     
    562567
    563568        if ( is_user_logged_in() ) {
    564 
    565569                $my_groups_count = bp_get_total_group_count_for_user( bp_loggedin_user_id() );
     570                $groups_slug     = bp_nouveau_get_component_slug( 'groups' );
     571                $path_chunks     = array(
     572                        'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $groups_slug, $groups_slug ),
     573                );
    566574
    567575                // If the user has groups create a nav item
    568576                if ( $my_groups_count ) {
     577                        $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $groups_slug . '_my_groups', 'my-groups' );
     578
    569579                        $nav_items['personal'] = array(
    570580                                'component' => 'groups',
    571581                                'slug'      => 'personal', // slug is used because BP_Core_Nav requires it, but it's the scope
    572582                                'li_class'  => array(),
    573                                 'link'      => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'groups' ) . '/my-groups/',
     583                                'link'      => bp_loggedin_user_url( $path_chunks ),
    574584                                'text'      => __( 'My Groups', 'buddypress' ),
    575585                                'count'     => $my_groups_count,
  • trunk/src/bp-templates/bp-nouveau/includes/members/functions.php

    r13301 r13442  
    7878                // If friends component is active and the user has friends
    7979                if ( bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) {
     80                        $friends_slug = bp_nouveau_get_component_slug( 'friends' );
     81                        $path_chunks   = array(
     82                                'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $friends_slug, $friends_slug ),
     83                                'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $friends_slug . '_my_friends', 'my-friends' ),
     84                        );
     85
    8086                        $nav_items['personal'] = array(
    8187                                'component' => 'members',
    8288                                'slug'      => 'personal', // slug is used because BP_Core_Nav requires it, but it's the scope
    8389                                'li_class'  => array(),
    84                                 'link'      => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'friends' ) . '/my-friends/',
     90                                'link'      => bp_loggedin_user_url( $path_chunks ),
    8591                                'text'      => __( 'My Friends', 'buddypress' ),
    8692                                'count'     => bp_get_total_friend_count( bp_loggedin_user_id() ),
  • trunk/src/bp-templates/bp-nouveau/includes/messages/functions.php

    r13441 r13442  
    210210
    211211/**
    212  * @since 3.0.0
     212 * Replaces the Notices Compose URL.
     213 *
     214 * @since 3.0.0
     215 *
     216 * @param array $admin_nav The WP Admin Nav.
    213217 */
    214218function bp_nouveau_messages_adjust_admin_nav( $admin_nav ) {
     
    217221        }
    218222
    219         $user_messages_link = trailingslashit( bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'messages' ) );
    220 
    221223        foreach ( $admin_nav as $nav_iterator => $nav ) {
    222224                $nav_id = str_replace( 'my-account-messages-', '', $nav['id'] );
    223225
    224226                if ( 'notices' === $nav_id ) {
    225                         $admin_nav[ $nav_iterator ]['href'] = esc_url( add_query_arg( array(
    226                                 'page' => 'bp-notices'
    227                         ), bp_get_admin_url( 'users.php' ) ) );
     227                        $admin_nav[ $nav_iterator ]['href'] = esc_url(
     228                                add_query_arg(
     229                                        array(
     230                                                'page' => 'bp-notices',
     231                                        ),
     232                                        bp_get_admin_url( 'users.php' )
     233                                )
     234                        );
    228235                }
    229236        }
     
    271278                'total_count'       => 1,
    272279                'content'           => __( 'New sitewide notice', 'buddypress' ),
    273                 'href'              => bp_loggedin_user_domain(),
     280                'href'              => bp_loggedin_user_url(),
    274281        );
    275282
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php

    r13441 r13442  
    316316                // Menus for logged in user.
    317317                if ( is_user_logged_in() ) {
    318 
    319                         // Profile link.
    320                         $profile_link = trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() );
     318                        $profile_slug = bp_get_profile_slug();
     319                        $path_chunks  = array(
     320                                'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ),
     321                        );
    321322
    322323                        // Add the "Profile" sub menu.
     
    325326                                'id'     => 'my-account-' . $this->id,
    326327                                'title'  => _x( 'Profile', 'My Account Profile', 'buddypress' ),
    327                                 'href'   => $profile_link,
     328                                'href'   => bp_loggedin_user_url( $path_chunks ),
    328329                        );
     330
     331                        $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_public', 'public' );
    329332
    330333                        // View Profile.
     
    333336                                'id'       => 'my-account-' . $this->id . '-public',
    334337                                'title'    => _x( 'View', 'My Account Profile sub nav', 'buddypress' ),
    335                                 'href'     => trailingslashit( $profile_link . 'public' ),
     338                                'href'     => bp_loggedin_user_url( $path_chunks ),
    336339                                'position' => 10,
    337340                        );
     341
     342                        $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit', 'edit' );
    338343
    339344                        // Edit Profile.
     
    342347                                'id'       => 'my-account-' . $this->id . '-edit',
    343348                                'title'    => _x( 'Edit', 'My Account Profile sub nav', 'buddypress' ),
    344                                 'href'     => trailingslashit( $profile_link . 'edit' ),
     349                                'href'     => bp_loggedin_user_url( $path_chunks ),
    345350                                'position' => 20,
    346351                        );
     
    417422
    418423                // Setup the logged in user variables.
    419                 $settings_link = trailingslashit( bp_loggedin_user_domain() . bp_get_settings_slug() );
     424                $settings_slug = bp_get_settings_slug();
     425                $path_chunks   = array(
     426                        'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug, $settings_slug ),
     427                        'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug . '_profile', 'profile' ),
     428                );
    420429
    421430                // Add the "Profile" subnav item.
     
    424433                        'id'     => 'my-account-' . buddypress()->settings->id . '-profile',
    425434                        'title'  => _x( 'Profile', 'My Account Settings sub nav', 'buddypress' ),
    426                         'href'   => trailingslashit( $settings_link . 'profile' ),
     435                        'href'   => bp_loggedin_user_url( $path_chunks ),
    427436                );
    428437
  • trunk/tests/phpunit/includes/testcase.php

    r13436 r13442  
    192192                $GLOBALS['bp']->loggedin_user = NULL;
    193193                $GLOBALS['bp']->pages = bp_core_get_directory_pages();
     194
     195                foreach ( array_keys( bp_core_get_active_components() ) as $component ) {
     196                        $GLOBALS['bp']->{$component}->main_nav = array();
     197                        $GLOBALS['bp']->{$component}->sub_nav = array();
     198                }
    194199
    195200                parent::go_to( $url );
  • trunk/tests/phpunit/testcases/core/class-bp-walker-nav-menu.php

    r13314 r13442  
    2929                                'name'         => 'Activity',
    3030                                'slug'         => 'activity',
    31                                 'link'         => trailingslashit( bp_loggedin_user_domain() . bp_get_activity_slug() ),
     31                                'link'         => bp_loggedin_user_url( array( 'single_item_component' => bp_get_activity_slug() ) ),
    3232                                'css_id'       => 'activity',
    3333                                'class'        => array( $expected[0] ),
     
    3737                                'name'         => 'Profile',
    3838                                'slug'         => 'profile',
    39                                 'link'         => trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() ),
     39                                'link'         => bp_loggedin_user_url( array( 'single_item_component' => bp_get_profile_slug() ) ),
    4040                                'css_id'       => 'xprofile',
    4141                                'class'        => array( $expected[1] ),
Note: See TracChangeset for help on using the changeset viewer.