Changeset 13759 for trunk/src/bp-activity/screens/permalink.php
- Timestamp:
- 03/09/2024 10:46:28 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-activity/screens/permalink.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)