-
diff --git src/bp-templates/bp-nouveau/buddypress/common/search-and-filters-bar.php src/bp-templates/bp-nouveau/buddypress/common/search-and-filters-bar.php
index e963c4375..1e95b3856 100644
|
|
|
8 | 8 | ?> |
9 | 9 | <div class="subnav-filters filters no-ajax" id="subnav-filters"> |
10 | 10 | |
11 | | <?php if ( bp_get_friends_slug() !== bp_current_component() ) : ?> |
| 11 | <?php if ( bp_nouveau_get_component_slug( 'friends' ) !== bp_current_component() ) : ?> |
12 | 12 | <div class="subnav-search clearfix"> |
13 | 13 | |
14 | | <?php if ( bp_nouveau_is_feed_enable() ) : ?> |
| 14 | <?php if ( bp_nouveau_get_component_slug( 'activity' ) === bp_current_component() && bp_nouveau_is_feed_enable() ) : ?> |
15 | 15 | <div id="activity-rss-feed" class="feed"> |
16 | 16 | <a href="<?php bp_nouveau_activity_rss_link(); ?>" class="bp-tooltip" data-bp-tooltip="<?php bp_nouveau_activity_rss_tooltip(); ?>"> |
17 | 17 | <span class="bp-screen-reader-text"><?php bp_nouveau_activity_rss_screen_reader_text(); ?></span> |
… |
… |
|
26 | 26 | |
27 | 27 | <?php if ( bp_is_user() && ! bp_is_current_action( 'requests' ) ) : ?> |
28 | 28 | <?php bp_get_template_part( 'common/filters/user-screens-filters' ); ?> |
29 | | <?php elseif ( bp_get_groups_slug() === bp_current_component() ) : ?> |
| 29 | <?php elseif ( bp_nouveau_get_component_slug( 'groups' ) === bp_current_component() ) : ?> |
30 | 30 | <?php bp_get_template_part( 'common/filters/groups-screens-filters' ); ?> |
31 | 31 | <?php else : ?> |
32 | 32 | <?php bp_get_template_part( 'common/filters/directory-filters' ); ?> |
-
diff --git src/bp-templates/bp-nouveau/buddypress/members/single/settings/capabilities.php src/bp-templates/bp-nouveau/buddypress/members/single/settings/capabilities.php
index 7a36b4242..1d55a2620 100644
|
|
|
3 | 3 | * BuddyPress - Members Settings ( Capabilities ) |
4 | 4 | * |
5 | 5 | * @since 3.0.0 |
6 | | * @version 3.1.0 |
| 6 | * @version 8.0.0 |
7 | 7 | */ |
8 | 8 | |
9 | 9 | bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
… |
… |
bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
12 | 12 | <?php esc_html_e( 'Members Capabilities', 'buddypress' ); ?> |
13 | 13 | </h2> |
14 | 14 | |
15 | | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/capabilities/' ); ?>" name="account-capabilities-form" id="account-capabilities-form" class="standard-form" method="post"> |
| 15 | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'settings' ) . '/capabilities/' ); ?>" name="account-capabilities-form" id="account-capabilities-form" class="standard-form" method="post"> |
16 | 16 | |
17 | 17 | <label for="user-spammer"> |
18 | 18 | <input type="checkbox" name="user-spammer" id="user-spammer" value="1" <?php checked( bp_is_user_spammer( bp_displayed_user_id() ) ); ?> /> |
-
diff --git src/bp-templates/bp-nouveau/buddypress/members/single/settings/data.php src/bp-templates/bp-nouveau/buddypress/members/single/settings/data.php
index 0202ede61..3d6703828 100644
|
|
|
3 | 3 | * BuddyPress - Members Settings (Export Data) |
4 | 4 | * |
5 | 5 | * @since 3.1.0 |
6 | | * @version 3.1.0 |
| 6 | * @version 8.0.0 |
7 | 7 | */ |
8 | 8 | |
9 | 9 | bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
… |
… |
bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
63 | 63 | </h2> |
64 | 64 | |
65 | 65 | <?php /* translators: Link to Delete Account Settings page */ ?> |
66 | | <p><?php esc_html_e( 'To erase all data associated with your account, your user account must be completely deleted.', 'buddypress' ); ?> <?php if ( bp_disable_account_deletion() ) : ?><?php esc_html_e( 'Please contact the site administrator to request account deletion.', 'buddypress' ); ?><?php else : ?><?php printf( esc_html__( 'You may delete your account by visiting the %s page.', 'buddypress' ), sprintf( '<a href="%s">%s</a>', bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account/', esc_html__( 'Delete Account', 'buddypress' ) ) ); ?><?php endif; ?></p> |
| 66 | <p><?php esc_html_e( 'To erase all data associated with your account, your user account must be completely deleted.', 'buddypress' ); ?> <?php if ( bp_disable_account_deletion() ) : ?><?php esc_html_e( 'Please contact the site administrator to request account deletion.', 'buddypress' ); ?><?php else : ?><?php printf( esc_html__( 'You may delete your account by visiting the %s page.', 'buddypress' ), sprintf( '<a href="%s">%s</a>', bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'settings' ) . '/delete-account/', esc_html__( 'Delete Account', 'buddypress' ) ) ); ?><?php endif; ?></p> |
67 | 67 | |
68 | 68 | <?php |
69 | 69 | bp_nouveau_member_hook( 'after', 'settings_template' ); |
-
diff --git src/bp-templates/bp-nouveau/buddypress/members/single/settings/delete-account.php src/bp-templates/bp-nouveau/buddypress/members/single/settings/delete-account.php
index b150867f4..50937e4d9 100644
|
|
|
3 | 3 | * BuddyPress - Members Settings ( Delete Account ) |
4 | 4 | * |
5 | 5 | * @since 3.0.0 |
6 | | * @version 7.0.0 |
| 6 | * @version 8.0.0 |
7 | 7 | */ |
8 | 8 | |
9 | 9 | bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
… |
… |
bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
14 | 14 | |
15 | 15 | <?php bp_nouveau_user_feedback( 'member-delete-account' ); ?> |
16 | 16 | |
17 | | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account' ); ?>" name="account-delete-form" id="account-delete-form" class="standard-form" method="post"> |
| 17 | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'settings' ) . '/delete-account' ); ?>" name="account-delete-form" id="account-delete-form" class="standard-form" method="post"> |
18 | 18 | |
19 | 19 | <label id="delete-account-understand" class="warn" for="delete-account-understand"> |
20 | 20 | <input class="disabled" type="checkbox" name="delete-account-understand" value="1" data-bp-disable-input="delete-account-button" /> |
-
diff --git src/bp-templates/bp-nouveau/buddypress/members/single/settings/general.php src/bp-templates/bp-nouveau/buddypress/members/single/settings/general.php
index 10c9a2e08..05678e060 100644
|
|
|
3 | 3 | * BuddyPress - Members Settings ( General ) |
4 | 4 | * |
5 | 5 | * @since 3.0.0 |
6 | | * @version 5.0.0 |
| 6 | * @version 8.0.0 |
7 | 7 | */ |
8 | 8 | |
9 | 9 | bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
… |
… |
bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
16 | 16 | <?php esc_html_e( 'Update your email and or password.', 'buddypress' ); ?> |
17 | 17 | </p> |
18 | 18 | |
19 | | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/general' ); ?>" method="post" class="standard-form" id="your-profile"> |
| 19 | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'settings' ) . '/general' ); ?>" method="post" class="standard-form" id="your-profile"> |
20 | 20 | |
21 | 21 | <?php if ( ! is_super_admin() ) : ?> |
22 | 22 | |
-
diff --git src/bp-templates/bp-nouveau/buddypress/members/single/settings/group-invites.php src/bp-templates/bp-nouveau/buddypress/members/single/settings/group-invites.php
index 1caa2ee61..bc1c8df28 100644
|
|
|
3 | 3 | * BuddyPress - Members Settings ( Group Invites ) |
4 | 4 | * |
5 | 5 | * @since 3.0.0 |
6 | | * @version 3.0.0 |
| 6 | * @version 8.0.0 |
7 | 7 | */ |
8 | 8 | ?> |
9 | 9 | |
… |
… |
if ( 1 === bp_nouveau_groups_get_group_invites_setting() ) { |
20 | 20 | ?> |
21 | 21 | |
22 | 22 | |
23 | | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/invites/' ); ?>" name="account-group-invites-form" id="account-group-invites-form" class="standard-form" method="post"> |
| 23 | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'settings' ) . '/invites/' ); ?>" name="account-group-invites-form" id="account-group-invites-form" class="standard-form" method="post"> |
24 | 24 | |
25 | 25 | <label for="account-group-invites-preferences"> |
26 | 26 | <input type="checkbox" name="account-group-invites-preferences" id="account-group-invites-preferences" value="1" <?php checked( 1, bp_nouveau_groups_get_group_invites_setting() ); ?>/> |
-
diff --git src/bp-templates/bp-nouveau/buddypress/members/single/settings/notifications.php src/bp-templates/bp-nouveau/buddypress/members/single/settings/notifications.php
index c01b6e774..642322da8 100644
|
|
bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
16 | 16 | <?php _e( 'Set your email notification preferences.', 'buddypress' ); ?> |
17 | 17 | </p> |
18 | 18 | |
19 | | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/notifications' ); ?>" method="post" class="standard-form" id="settings-form"> |
| 19 | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'settings' ) . '/notifications' ); ?>" method="post" class="standard-form" id="settings-form"> |
20 | 20 | |
21 | 21 | <?php bp_nouveau_member_email_notice_settings(); ?> |
22 | 22 | |
-
diff --git src/bp-templates/bp-nouveau/buddypress/members/single/settings/profile.php src/bp-templates/bp-nouveau/buddypress/members/single/settings/profile.php
index 3f968d99d..e882b7a57 100644
|
|
|
3 | 3 | * BuddyPress - Members Settings ( Profile ) |
4 | 4 | * |
5 | 5 | * @since 3.0.0 |
6 | | * @version 3.1.0 |
| 6 | * @version 8.0.0 |
7 | 7 | */ |
8 | 8 | |
9 | 9 | bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
… |
… |
bp_nouveau_member_hook( 'before', 'settings_template' ); ?> |
16 | 16 | <?php esc_html_e( 'Select who may see your profile details.', 'buddypress' ); ?> |
17 | 17 | </p> |
18 | 18 | |
19 | | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/profile/' ); ?>" method="post" class="standard-form" id="settings-form"> |
| 19 | <form action="<?php echo esc_url( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'settings' ) . '/profile/' ); ?>" method="post" class="standard-form" id="settings-form"> |
20 | 20 | |
21 | 21 | <?php if ( bp_xprofile_get_settings_fields() ) : ?> |
22 | 22 | |
-
diff --git src/bp-templates/bp-nouveau/includes/activity/ajax.php src/bp-templates/bp-nouveau/includes/activity/ajax.php
index 28bcee926..dfe892a33 100644
|
|
|
3 | 3 | * Activity Ajax functions |
4 | 4 | * |
5 | 5 | * @since 3.0.0 |
6 | | * @version 3.1.0 |
| 6 | * @version 8.0.0 |
7 | 7 | */ |
8 | 8 | |
9 | 9 | // Exit if accessed directly. |
… |
… |
function bp_nouveau_ajax_mark_activity_favorite() { |
115 | 115 | |
116 | 116 | if ( 1 === $fav_count ) { |
117 | 117 | $response['directory_tab'] = '<li id="activity-favorites" data-bp-scope="favorites" data-bp-object="activity"> |
118 | | <a href="' . bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/"> |
| 118 | <a href="' . bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/favorites/"> |
119 | 119 | ' . esc_html__( 'My Favorites', 'buddypress' ) . ' |
120 | 120 | </a> |
121 | 121 | </li>'; |
-
diff --git src/bp-templates/bp-nouveau/includes/activity/functions.php src/bp-templates/bp-nouveau/includes/activity/functions.php
index f8ac08c91..052b49ff4 100644
|
|
|
3 | 3 | * Activity functions |
4 | 4 | * |
5 | 5 | * @since 3.0.0 |
6 | | * @version 7.0.0 |
| 6 | * @version 8.0.0 |
7 | 7 | */ |
8 | 8 | |
9 | 9 | // Exit if accessed directly. |
… |
… |
function bp_nouveau_get_activity_directory_nav_items() { |
226 | 226 | 'component' => 'activity', |
227 | 227 | 'slug' => 'favorites', // slug is used because BP_Core_Nav requires it, but it's the scope |
228 | 228 | 'li_class' => array(), |
229 | | 'link' => bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/', |
| 229 | 'link' => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/favorites/', |
230 | 230 | 'text' => __( 'My Favorites', 'buddypress' ), |
231 | 231 | 'count' => false, |
232 | 232 | 'position' => 35, |
… |
… |
function bp_nouveau_get_activity_directory_nav_items() { |
239 | 239 | 'component' => 'activity', |
240 | 240 | 'slug' => 'friends', // slug is used because BP_Core_Nav requires it, but it's the scope |
241 | 241 | 'li_class' => array( 'dynamic' ), |
242 | | 'link' => bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/', |
| 242 | 'link' => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/' . bp_nouveau_get_component_slug( 'friends' ) . '/', |
243 | 243 | 'text' => __( 'My Friends', 'buddypress' ), |
244 | 244 | 'count' => '', |
245 | 245 | 'position' => 15, |
… |
… |
function bp_nouveau_get_activity_directory_nav_items() { |
252 | 252 | 'component' => 'activity', |
253 | 253 | 'slug' => 'groups', // slug is used because BP_Core_Nav requires it, but it's the scope |
254 | 254 | 'li_class' => array( 'dynamic' ), |
255 | | 'link' => bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/', |
| 255 | 'link' => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/' . bp_nouveau_get_component_slug( 'groups' ) . '/', |
256 | 256 | 'text' => __( 'My Groups', 'buddypress' ), |
257 | 257 | 'count' => '', |
258 | 258 | 'position' => 25, |
… |
… |
function bp_nouveau_get_activity_directory_nav_items() { |
272 | 272 | 'component' => 'activity', |
273 | 273 | 'slug' => 'mentions', // slug is used because BP_Core_Nav requires it, but it's the scope |
274 | 274 | 'li_class' => array( 'dynamic' ), |
275 | | 'link' => bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/', |
| 275 | 'link' => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/mentions/', |
276 | 276 | 'text' => __( 'Mentions', 'buddypress' ), |
277 | 277 | 'count' => $count, |
278 | 278 | 'position' => 45, |
-
diff --git src/bp-templates/bp-nouveau/includes/activity/template-tags.php src/bp-templates/bp-nouveau/includes/activity/template-tags.php
index e1ad849ff..1b4263871 100644
|
|
function bp_nouveau_activity_entry_buttons( $args = array() ) { |
514 | 514 | } |
515 | 515 | |
516 | 516 | $buttons['activity_spam']['button_attr'][ $data_element ] = wp_nonce_url( |
517 | | bp_get_root_domain() . '/' . bp_get_activity_slug() . '/spam/' . $activity_id . '/', |
| 517 | bp_get_root_domain() . '/' . bp_nouveau_get_component_slug( 'activity' ) . '/spam/' . $activity_id . '/', |
518 | 518 | 'bp_activity_akismet_spam_' . $activity_id |
519 | 519 | ); |
520 | 520 | } |
… |
… |
function bp_nouveau_activity_comment_buttons( $args = array() ) { |
842 | 842 | } |
843 | 843 | |
844 | 844 | $buttons['activity_comment_spam']['button_attr'][ $data_element ] = wp_nonce_url( |
845 | | bp_get_root_domain() . '/' . bp_get_activity_slug() . '/spam/' . $activity_comment_id . '/?cid=' . $activity_comment_id, |
| 845 | bp_get_root_domain() . '/' . bp_nouveau_get_component_slug( 'activity' ) . '/spam/' . $activity_comment_id . '/?cid=' . $activity_comment_id, |
846 | 846 | 'bp_activity_akismet_spam_' . $activity_comment_id |
847 | 847 | ); |
848 | 848 | } |
-
diff --git src/bp-templates/bp-nouveau/includes/ajax.php src/bp-templates/bp-nouveau/includes/ajax.php
index bbefca7bc..7a96fbce6 100644
|
|
|
3 | 3 | * Common functions only loaded on AJAX requests. |
4 | 4 | * |
5 | 5 | * @since 3.0.0 |
6 | | * @version 3.0.0 |
| 6 | * @version 8.0.0 |
7 | 7 | */ |
8 | 8 | |
9 | 9 | // Exit if accessed directly. |
… |
… |
function bp_nouveau_ajax_object_template_loader() { |
48 | 48 | // We need to calculate and return the feed URL for each scope. |
49 | 49 | switch ( $scope ) { |
50 | 50 | case 'friends': |
51 | | $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/friends/feed/'; |
| 51 | $feed_url = bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/friends/feed/'; |
52 | 52 | break; |
53 | 53 | case 'groups': |
54 | | $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/groups/feed/'; |
| 54 | $feed_url = bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/groups/feed/'; |
55 | 55 | break; |
56 | 56 | case 'favorites': |
57 | | $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/feed/'; |
| 57 | $feed_url = bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/favorites/feed/'; |
58 | 58 | break; |
59 | 59 | case 'mentions': |
60 | | $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/feed/'; |
| 60 | $feed_url = bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/mentions/feed/'; |
61 | 61 | |
62 | 62 | // Get user new mentions |
63 | 63 | $new_mentions = bp_get_user_meta( bp_loggedin_user_id(), 'bp_new_mentions', true ); |
-
diff --git src/bp-templates/bp-nouveau/includes/blogs/functions.php src/bp-templates/bp-nouveau/includes/blogs/functions.php
index 548c28be9..8072b2e45 100644
|
|
function bp_nouveau_get_blogs_directory_nav_items() { |
34 | 34 | 'component' => 'blogs', |
35 | 35 | 'slug' => 'personal', // slug is used because BP_Core_Nav requires it, but it's the scope |
36 | 36 | 'li_class' => array(), |
37 | | 'link' => bp_loggedin_user_domain() . bp_get_blogs_slug(), |
| 37 | 'link' => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'blogs' ), |
38 | 38 | 'text' => __( 'My Sites', 'buddypress' ), |
39 | 39 | 'count' => $my_blogs_count, |
40 | 40 | 'position' => 15, |
-
diff --git src/bp-templates/bp-nouveau/includes/functions.php src/bp-templates/bp-nouveau/includes/functions.php
index 69a72e110..9ee9b52c5 100644
|
|
function bp_nouveau_set_nav_item_order( $nav = null, $order = array(), $parent_s |
1391 | 1391 | |
1392 | 1392 | return true; |
1393 | 1393 | } |
| 1394 | |
| 1395 | /** |
| 1396 | * Gets the component's slug thanks to its ID. |
| 1397 | * |
| 1398 | * @since 8.0.0 |
| 1399 | * |
| 1400 | * @param string $component_id The component ID. |
| 1401 | * @return string The slug for the requested component ID. |
| 1402 | */ |
| 1403 | function bp_nouveau_get_component_slug( $component_id = '' ) { |
| 1404 | $slug = ''; |
| 1405 | |
| 1406 | if ( bp_is_active( $component_id ) ) { |
| 1407 | switch ( $component_id ) { |
| 1408 | case 'activity': |
| 1409 | $slug = bp_get_activity_slug(); |
| 1410 | break; |
| 1411 | case 'blogs': |
| 1412 | $slug = bp_get_blogs_slug(); |
| 1413 | break; |
| 1414 | case 'friends': |
| 1415 | $slug = bp_get_friends_slug(); |
| 1416 | break; |
| 1417 | case 'groups': |
| 1418 | $slug = bp_get_groups_slug(); |
| 1419 | break; |
| 1420 | case 'messages': |
| 1421 | $slug = bp_get_messages_slug(); |
| 1422 | break; |
| 1423 | case 'notifications': |
| 1424 | $slug = bp_get_notifications_slug(); |
| 1425 | break; |
| 1426 | case 'settings': |
| 1427 | $slug = bp_get_settings_slug(); |
| 1428 | break; |
| 1429 | case 'xprofile': |
| 1430 | $slug = bp_get_profile_slug(); |
| 1431 | break; |
| 1432 | } |
| 1433 | } |
| 1434 | |
| 1435 | // Defaults to the component ID. |
| 1436 | if ( ! $slug ) { |
| 1437 | $slug = $component_id; |
| 1438 | } |
| 1439 | |
| 1440 | /** |
| 1441 | * Filter here to edit the slug for the requested component ID. |
| 1442 | * |
| 1443 | * @since 8.0.0 |
| 1444 | * |
| 1445 | * @param string $slug The slug for the requested component ID. |
| 1446 | * @param string $component_id The component ID. |
| 1447 | */ |
| 1448 | return apply_filters( 'bp_nouveau_get_component_slug', $slug, $component_id ); |
| 1449 | } |
-
diff --git src/bp-templates/bp-nouveau/includes/groups/functions.php src/bp-templates/bp-nouveau/includes/groups/functions.php
index 06be6985b..04fd01ec0 100644
|
|
function bp_nouveau_prepare_group_for_js( $item ) { |
424 | 424 | * @since 3.0.0 |
425 | 425 | */ |
426 | 426 | function bp_nouveau_groups_invites_restriction_nav() { |
427 | | $slug = bp_get_settings_slug(); |
| 427 | $slug = bp_nouveau_get_component_slug( 'settings' ); |
428 | 428 | $user_domain = bp_loggedin_user_domain(); |
429 | 429 | |
430 | 430 | if ( bp_displayed_user_domain() ) { |
… |
… |
function bp_nouveau_groups_invites_restriction_nav() { |
454 | 454 | */ |
455 | 455 | function bp_nouveau_groups_invites_restriction_admin_nav( $wp_admin_nav ) { |
456 | 456 | // Setup the logged in user variables. |
457 | | $settings_link = trailingslashit( bp_loggedin_user_domain() . bp_get_settings_slug() ); |
| 457 | $settings_link = trailingslashit( bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'settings' ) ); |
458 | 458 | |
459 | 459 | // Add the "Group Invites" subnav item. |
460 | 460 | $wp_admin_nav[] = array( |
… |
… |
function bp_nouveau_groups_screen_invites_restriction() { |
495 | 495 | bp_core_add_message( __( 'You are not allowed to perform this action.', 'buddypress' ), 'error' ); |
496 | 496 | } |
497 | 497 | |
498 | | bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_settings_slug() ) . 'invites/' ); |
| 498 | bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'settings' ) ) . 'invites/' ); |
499 | 499 | } |
500 | 500 | |
501 | 501 | /** |
… |
… |
function bp_nouveau_get_groups_directory_nav_items() { |
568 | 568 | 'component' => 'groups', |
569 | 569 | 'slug' => 'personal', // slug is used because BP_Core_Nav requires it, but it's the scope |
570 | 570 | 'li_class' => array(), |
571 | | 'link' => bp_loggedin_user_domain() . bp_get_groups_slug() . '/my-groups/', |
| 571 | 'link' => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'groups' ) . '/my-groups/', |
572 | 572 | 'text' => __( 'My Groups', 'buddypress' ), |
573 | 573 | 'count' => $my_groups_count, |
574 | 574 | 'position' => 15, |
-
diff --git src/bp-templates/bp-nouveau/includes/members/functions.php src/bp-templates/bp-nouveau/includes/members/functions.php
index de6bbea3b..6160d33be 100644
|
|
function bp_nouveau_get_members_directory_nav_items() { |
58 | 58 | 'component' => 'members', |
59 | 59 | 'slug' => 'personal', // slug is used because BP_Core_Nav requires it, but it's the scope |
60 | 60 | 'li_class' => array(), |
61 | | 'link' => bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/', |
| 61 | 'link' => bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'friends' ) . '/my-friends/', |
62 | 62 | 'text' => __( 'My Friends', 'buddypress' ), |
63 | 63 | 'count' => bp_get_total_friend_count( bp_loggedin_user_id() ), |
64 | 64 | 'position' => 15, |
-
diff --git src/bp-templates/bp-nouveau/includes/members/template-tags.php src/bp-templates/bp-nouveau/includes/members/template-tags.php
index b4fc3ae63..a1eff11c4 100644
|
|
function bp_nouveau_members_loop_buttons( $args = array() ) { |
449 | 449 | 'class' => $parent_class, |
450 | 450 | ), |
451 | 451 | 'button_attr' => array( |
452 | | 'href' => trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() ) . 'compose?r=' . bp_core_get_username( $user_id ), |
| 452 | 'href' => trailingslashit( bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'messages' ) ) . 'compose?r=' . bp_core_get_username( $user_id ), |
453 | 453 | 'id' => false, |
454 | 454 | 'class' => $button_args['link_class'], |
455 | 455 | 'rel' => '', |
456 | 456 | 'title' => '', |
457 | | ), |
| 457 | ), |
458 | 458 | ); |
459 | 459 | |
460 | 460 | unset( bp_nouveau()->members->button_args ); |
-
diff --git src/bp-templates/bp-nouveau/includes/messages/functions.php src/bp-templates/bp-nouveau/includes/messages/functions.php
index c10e9280a..1ec7d6e26 100644
|
|
function bp_nouveau_messages_localize_scripts( $params = array() ) { |
116 | 116 | /* translators: %s: number of message recipients */ |
117 | 117 | 'more' => __( '(and %d others)', 'buddypress' ), |
118 | 118 | ), |
119 | | 'rootUrl' => parse_url( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() ), PHP_URL_PATH ), |
| 119 | 'rootUrl' => parse_url( trailingslashit( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'messages' ) ), PHP_URL_PATH ), |
120 | 120 | ); |
121 | 121 | |
122 | 122 | // Star private messages. |
… |
… |
function bp_nouveau_messages_localize_scripts( $params = array() ) { |
145 | 145 | function bp_nouveau_messages_adjust_nav() { |
146 | 146 | $bp = buddypress(); |
147 | 147 | |
148 | | $secondary_nav_items = $bp->members->nav->get_secondary( array( 'parent_slug' => bp_get_messages_slug() ), false ); |
| 148 | $secondary_nav_items = $bp->members->nav->get_secondary( array( 'parent_slug' => bp_nouveau_get_component_slug( 'messages' ) ), false ); |
149 | 149 | |
150 | 150 | if ( empty( $secondary_nav_items ) ) { |
151 | 151 | return; |
… |
… |
function bp_nouveau_messages_adjust_nav() { |
157 | 157 | } |
158 | 158 | |
159 | 159 | if ( 'notices' === $secondary_nav_item->slug ) { |
160 | | bp_core_remove_subnav_item( bp_get_messages_slug(), $secondary_nav_item->slug, 'members' ); |
| 160 | bp_core_remove_subnav_item( bp_nouveau_get_component_slug( 'messages' ), $secondary_nav_item->slug, 'members' ); |
161 | 161 | } elseif ( 'compose' === $secondary_nav_item->slug ) { |
162 | 162 | $bp->members->nav->edit_nav( array( |
163 | 163 | 'user_has_access' => bp_is_my_profile() |
164 | | ), $secondary_nav_item->slug, bp_get_messages_slug() ); |
| 164 | ), $secondary_nav_item->slug, bp_nouveau_get_component_slug( 'messages' ) ); |
165 | 165 | } |
166 | 166 | } |
167 | 167 | } |
… |
… |
function bp_nouveau_messages_adjust_admin_nav( $admin_nav ) { |
174 | 174 | return $admin_nav; |
175 | 175 | } |
176 | 176 | |
177 | | $user_messages_link = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() ); |
| 177 | $user_messages_link = trailingslashit( bp_loggedin_user_domain() . bp_nouveau_get_component_slug( 'messages' ) ); |
178 | 178 | |
179 | 179 | foreach ( $admin_nav as $nav_iterator => $nav ) { |
180 | 180 | $nav_id = str_replace( 'my-account-messages-', '', $nav['id'] ); |
-
diff --git src/bp-templates/bp-nouveau/includes/template-tags.php src/bp-templates/bp-nouveau/includes/template-tags.php
index d7aec27d7..c6f3fee76 100644
|
|
|
3 | 3 | * Common template tags |
4 | 4 | * |
5 | 5 | * @since 3.0.0 |
6 | | * @version 7.0.0 |
| 6 | * @version 8.0.0 |
7 | 7 | */ |
8 | 8 | |
9 | 9 | // Exit if accessed directly. |
… |
… |
function bp_nouveau_filter_options() { |
2239 | 2239 | function bp_nouveau_get_filter_options() { |
2240 | 2240 | $output = ''; |
2241 | 2241 | |
2242 | | if ( bp_get_notifications_slug() === bp_current_component() ) { |
| 2242 | if ( bp_nouveau_get_component_slug( 'notifications' ) === bp_current_component() ) { |
2243 | 2243 | $output = bp_nouveau_get_notifications_filters(); |
2244 | 2244 | |
2245 | 2245 | } else { |
… |
… |
function bp_nouveau_is_feed_enable() { |
2720 | 2720 | $retval = bp_activity_is_feed_enable( 'personal' ); |
2721 | 2721 | |
2722 | 2722 | if ( $retval ) { |
2723 | | $bp_nouveau->activity->current_rss_feed['link'] = trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/feed' ); |
| 2723 | $bp_nouveau->activity->current_rss_feed['link'] = trailingslashit( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/feed' ); |
2724 | 2724 | } |
2725 | 2725 | |
2726 | | if ( bp_is_active( 'friends' ) && bp_is_current_action( bp_get_friends_slug() ) ) { |
| 2726 | if ( bp_is_active( 'friends' ) && bp_is_current_action( bp_nouveau_get_component_slug( 'friends' ) ) ) { |
2727 | 2727 | $retval = bp_activity_is_feed_enable( 'friends' ); |
2728 | 2728 | |
2729 | 2729 | if ( $retval ) { |
2730 | | $bp_nouveau->activity->current_rss_feed['link'] = trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/feed' ); |
| 2730 | $bp_nouveau->activity->current_rss_feed['link'] = trailingslashit( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/' . bp_nouveau_get_component_slug( 'friends' ) . '/feed' ); |
2731 | 2731 | } |
2732 | | } elseif ( bp_is_active( 'groups' ) && bp_is_current_action( bp_get_groups_slug() ) ) { |
| 2732 | } elseif ( bp_is_active( 'groups' ) && bp_is_current_action( bp_nouveau_get_component_slug( 'groups' ) ) ) { |
2733 | 2733 | $retval = bp_activity_is_feed_enable( 'mygroups' ); |
2734 | 2734 | |
2735 | 2735 | if ( $retval ) { |
2736 | | $bp_nouveau->activity->current_rss_feed['link'] = trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/feed' ); |
| 2736 | $bp_nouveau->activity->current_rss_feed['link'] = trailingslashit( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/' . bp_nouveau_get_component_slug( 'groups' ) . '/feed' ); |
2737 | 2737 | } |
2738 | 2738 | } elseif ( bp_activity_do_mentions() && bp_is_current_action( 'mentions' ) ) { |
2739 | 2739 | $retval = bp_activity_is_feed_enable( 'mentions' ); |
2740 | 2740 | |
2741 | 2741 | if ( $retval ) { |
2742 | | $bp_nouveau->activity->current_rss_feed['link'] = trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/feed' ); |
| 2742 | $bp_nouveau->activity->current_rss_feed['link'] = trailingslashit( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/mentions/feed' ); |
2743 | 2743 | } |
2744 | 2744 | } elseif ( bp_activity_can_favorite() && bp_is_current_action( 'favorites' ) ) { |
2745 | 2745 | $retval = bp_activity_is_feed_enable( 'mentions' ); |
2746 | 2746 | |
2747 | 2747 | if ( $retval ) { |
2748 | | $bp_nouveau->activity->current_rss_feed['link'] = trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/feed' ); |
| 2748 | $bp_nouveau->activity->current_rss_feed['link'] = trailingslashit( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'activity' ) . '/favorites/feed' ); |
2749 | 2749 | } |
2750 | 2750 | } |
2751 | 2751 | } |