- Timestamp:
- 09/24/2021 01:54:39 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/activity/template-tags.php
r12970 r13114 4 4 * 5 5 * @since 3.0.0 6 * @version 8.1.06 * @version 10.0.0 7 7 */ 8 8 … … 145 145 146 146 bp_nouveau_hook( $hook ); 147 } 148 149 /** 150 * Output the `data-bp-activity-id` or `data-bp-activity-comment-id` attribute 151 * according to the activity type. 152 * 153 * @since 10.0.0 154 */ 155 function bp_nouveau_activity_data_attribute_id() { 156 $attribute = 'data-bp-%1$s-id="%2$s"'; 157 $type = 'activity'; 158 $id = (int) bp_get_activity_id(); 159 $comment_id = (int) bp_get_activity_comment_id(); 160 161 if ( 'activity_comment' === bp_get_activity_type() || $comment_id ) { 162 $type = 'activity-comment'; 163 164 165 if ( $comment_id ) { 166 $id = $comment_id; 167 } 168 } 169 170 printf( $attribute, $type, $id ); 147 171 } 148 172
Note: See TracChangeset
for help on using the changeset viewer.