Changeset 13443 for trunk/src/bp-activity/bp-activity-template.php
- Timestamp:
- 03/31/2023 05:26:39 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-template.php
r13437 r13443 3909 3909 * 3910 3910 * @since 1.2.0 3911 *3912 3911 */ 3913 3912 function bp_member_activity_feed_link() { 3914 echo bp_get_member_activity_feed_link(); 3915 } 3916 3917 /** 3918 * Output the member activity feed link. 3919 * 3920 * @since 1.0.0 3921 * @deprecated 1.2.0 3922 * 3923 * @todo properly deprecate in favor of bp_member_activity_feed_link(). 3924 * 3925 */ 3926 function bp_activities_member_rss_link() { echo bp_get_member_activity_feed_link(); } 3913 echo esc_url( bp_get_member_activity_feed_link() ); 3914 } 3927 3915 3928 3916 /** … … 3931 3919 * @since 1.2.0 3932 3920 * 3933 *3934 3921 * @return string $link The member activity feed link. 3935 3922 */ 3936 3923 function bp_get_member_activity_feed_link() { 3924 $activity_slug = bp_get_activity_slug(); 3925 $path_chunks = array( 3926 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug, $activity_slug ), 3927 ); 3937 3928 3938 3929 // Single member activity feed link. 3939 3930 if ( bp_is_profile_component() || bp_is_current_action( 'just-me' ) ) { 3940 $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/feed/'; 3931 $path_chunks['single_item_action'] = 'feed'; 3932 $link = bp_displayed_user_url( $path_chunks ); 3941 3933 3942 3934 // Friend feed link. 3943 3935 } elseif ( bp_is_active( 'friends' ) && bp_is_current_action( bp_get_friends_slug() ) ) { 3944 $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/feed/'; 3936 $friends_slug = bp_get_friends_slug(); 3937 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_' . $friends_slug, $friends_slug ); 3938 $path_chunks['single_item_action_variables'] = array( 'feed' ); 3939 $link = bp_displayed_user_url( $path_chunks ); 3945 3940 3946 3941 // Group feed link. 3947 3942 } elseif ( bp_is_active( 'groups' ) && bp_is_current_action( bp_get_groups_slug() ) ) { 3948 $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/feed/'; 3943 $groups_slug = bp_get_groups_slug(); 3944 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_' . $groups_slug, $groups_slug ); 3945 $path_chunks['single_item_action_variables'] = array( 'feed' ); 3946 $link = bp_displayed_user_url( $path_chunks ); 3949 3947 3950 3948 // Favorites activity feed link. 3951 3949 } elseif ( 'favorites' === bp_current_action() ) { 3952 $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/feed/'; 3950 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_favorites', 'favorites' ); 3951 $path_chunks['single_item_action_variables'] = array( 'feed' ); 3952 $link = bp_displayed_user_url( $path_chunks ); 3953 3953 3954 3954 // Mentions activity feed link. 3955 3955 } elseif ( ( 'mentions' === bp_current_action() ) && bp_activity_do_mentions() ) { 3956 $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/feed/'; 3956 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_mentions', 'mentions' ); 3957 $path_chunks['single_item_action_variables'] = array( 'feed' ); 3958 $link = bp_displayed_user_url( $path_chunks ); 3957 3959 3958 3960 // No feed link.
Note: See TracChangeset
for help on using the changeset viewer.