Changeset 13759
- Timestamp:
- 03/09/2024 10:46:28 AM (17 months ago)
- Location:
- trunk/src/bp-activity/screens
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/screens/favorites.php
r11885 r13759 23 23 do_action( 'bp_activity_screen_favorites' ); 24 24 25 /** 26 * Filters the template to load for the "Favorites" screen. 27 * 28 * @since 1.2.0 29 * 30 * @param string $template Path to the activity template to load. 31 */ 32 bp_core_load_template( apply_filters( 'bp_activity_template_favorite_activity', 'members/single/home' ) ); 25 $templates = array( 26 /** 27 * Filters the template to load for the "Favorites" screen. 28 * 29 * @since 1.2.0 30 * 31 * @param string $template Path to the activity template to load. 32 */ 33 apply_filters( 'bp_activity_template_favorite_activity', 'members/single/home' ), 34 'members/single/index', 35 ); 36 37 38 bp_core_load_template( $templates ); 33 39 } -
trunk/src/bp-activity/screens/friends.php
r11885 r13759 12 12 * 13 13 * @since 1.0.0 14 * 15 * @return void 14 16 */ 15 17 function bp_activity_screen_friends() { 16 if ( !bp_is_active( 'friends' ) ) 17 return false; 18 if ( ! bp_is_active( 'friends' ) ) { 19 return; 20 } 18 21 19 22 bp_update_is_item_admin( bp_current_user_can( 'bp_moderate' ), 'activity' ); … … 26 29 do_action( 'bp_activity_screen_friends' ); 27 30 28 /** 29 * Filters the template to load for the "My Friends" screen. 30 * 31 * @since 1.0.0 32 * 33 * @param string $template Path to the activity template to load. 34 */ 35 bp_core_load_template( apply_filters( 'bp_activity_template_friends_activity', 'members/single/home' ) ); 31 $templates = array( 32 /** 33 * Filters the template to load for the "My Friends" screen. 34 * 35 * @since 1.0.0 36 * 37 * @param string $template Path to the activity template to load. 38 */ 39 apply_filters( 'bp_activity_template_friends_activity', 'members/single/home' ), 40 'members/single/index', 41 ); 42 43 bp_core_load_template( $templates ); 36 44 } -
trunk/src/bp-activity/screens/groups.php
r11885 r13759 12 12 * 13 13 * @since 1.2.0 14 * 15 * @return void 14 16 */ 15 17 function bp_activity_screen_groups() { 16 if ( !bp_is_active( 'groups' ) ) 17 return false; 18 if ( ! bp_is_active( 'groups' ) ) { 19 return; 20 } 18 21 19 22 bp_update_is_item_admin( bp_current_user_can( 'bp_moderate' ), 'activity' ); … … 26 29 do_action( 'bp_activity_screen_groups' ); 27 30 28 /** 29 * Filters the template to load for the "My Groups" screen. 30 * 31 * @since 1.2.0 32 * 33 * @param string $template Path to the activity template to load. 34 */ 35 bp_core_load_template( apply_filters( 'bp_activity_template_groups_activity', 'members/single/home' ) ); 31 $templates = array( 32 /** 33 * Filters the template to load for the "My Groups" screen. 34 * 35 * @since 1.2.0 36 * 37 * @param string $template Path to the activity template to load. 38 */ 39 apply_filters( 'bp_activity_template_groups_activity', 'members/single/home' ), 40 'members/single/index', 41 ); 42 43 bp_core_load_template( $templates ); 36 44 } -
trunk/src/bp-activity/screens/just-me.php
r11885 r13759 22 22 do_action( 'bp_activity_screen_my_activity' ); 23 23 24 /** 25 * Filters the template to load for the "My Activity" screen. 26 * 27 * @since 1.0.0 28 * 29 * @param string $template Path to the activity template to load. 30 */ 31 bp_core_load_template( apply_filters( 'bp_activity_template_my_activity', 'members/single/home' ) ); 24 $templates = array( 25 /** 26 * Filters the template to load for the "My Activity" screen. 27 * 28 * @since 1.0.0 29 * 30 * @param string $template Path to the activity template to load. 31 */ 32 apply_filters( 'bp_activity_template_my_activity', 'members/single/home' ), 33 'members/single/index', 34 ); 35 36 bp_core_load_template( $templates ); 32 37 } -
trunk/src/bp-activity/screens/mentions.php
r11885 r13759 23 23 do_action( 'bp_activity_screen_mentions' ); 24 24 25 /** 26 * Filters the template to load for the "Mentions" screen. 27 * 28 * @since 1.2.0 29 * 30 * @param string $template Path to the activity template to load. 31 */ 32 bp_core_load_template( apply_filters( 'bp_activity_template_mention_activity', 'members/single/home' ) ); 25 $templates = array( 26 /** 27 * Filters the template to load for the "Mentions" screen. 28 * 29 * @since 1.2.0 30 * 31 * @param string $template Path to the activity template to load. 32 */ 33 apply_filters( 'bp_activity_template_mention_activity', 'members/single/home' ), 34 'members/single/index', 35 ); 36 37 bp_core_load_template( $templates ); 33 38 } 34 39 … … 38 43 * @since 1.5.0 39 44 * 45 * @return void 40 46 */ 41 47 function bp_activity_reset_my_new_mentions() { 42 if ( bp_is_my_profile() ) 43 bp_activity_clear_new_mentions( bp_loggedin_user_id() ); 48 if ( ! bp_is_my_profile() ) { 49 return; 50 } 51 52 bp_activity_clear_new_mentions( bp_loggedin_user_id() ); 44 53 } 45 54 add_action( 'bp_activity_screen_mentions', 'bp_activity_reset_my_new_mentions' ); -
trunk/src/bp-activity/screens/permalink.php
r13714 r13759 97 97 * @since 1.2.0 98 98 * 99 * @return bool|string Boolean on false or the template for a single activity item on success.99 * @return void 100 100 */ 101 101 function bp_activity_screen_single_activity_permalink() { 102 102 // No displayed user or not viewing activity component. 103 103 if ( ! bp_is_activity_component() ) { 104 return false;104 return; 105 105 } 106 106 107 107 $action = bp_current_action(); 108 108 if ( ! $action || ! is_numeric( $action ) ) { 109 return false;109 return; 110 110 } 111 111 112 112 // Get the activity details. 113 $activity = bp_activity_get_specific( array( 114 'activity_ids' => $action, 115 'show_hidden' => true, 116 'spam' => 'ham_only', 117 ) ); 113 $activity = bp_activity_get_specific( 114 array( 115 'activity_ids' => $action, 116 'show_hidden' => true, 117 'spam' => 'ham_only', 118 ) 119 ); 118 120 119 121 // 404 if activity does not exist. … … 162 164 } 163 165 164 /** 165 * Filters the template to load for a single activity screen. 166 * 167 * @since 1.0.0 168 * 169 * @param string $template Path to the activity template to load. 170 */ 171 $template = apply_filters( 'bp_activity_template_profile_activity_permalink', 'members/single/activity/permalink' ); 166 $templates = array( 167 /** 168 * Filters the template to load for a single activity screen. 169 * 170 * @since 1.0.0 171 * 172 * @param string $template Path to the activity template to load. 173 */ 174 apply_filters( 'bp_activity_template_profile_activity_permalink', 'members/single/activity/permalink' ), 175 'activity/single', 176 ); 172 177 173 // Load the template. 174 bp_core_load_template( $template ); 178 bp_core_load_template( $templates ); 175 179 } 176 180 add_action( 'bp_screens', 'bp_activity_screen_single_activity_permalink' );
Note: See TracChangeset
for help on using the changeset viewer.