Changeset 13631
- Timestamp:
- 11/03/2023 04:37:33 AM (15 months ago)
- Location:
- trunk/src/bp-templates/bp-nouveau
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/buddypress/activity/comment.php
r13114 r13631 7 7 * 8 8 * @since 3.0.0 9 * @version 1 0.0.09 * @version 12.0.0 10 10 */ 11 11 12 12 bp_nouveau_activity_hook( 'before', 'comment' ); ?> 13 13 14 <li id="acomment-<?php bp_activity_comment_id(); ?>" class="comment-item" <?php bp_nouveau_activity_ data_attribute_id(); ?>>14 <li id="acomment-<?php bp_activity_comment_id(); ?>" class="comment-item" <?php bp_nouveau_activity_comment_data_attribute_id(); ?>> 15 15 <div class="acomment-avatar item-avatar"> 16 16 <a href="<?php bp_activity_comment_user_link(); ?>"> -
trunk/src/bp-templates/bp-nouveau/includes/activity/template-tags.php
r13517 r13631 160 160 161 161 /** 162 * Output the `data-bp-activity-id` or `data-bp-activity-comment-id` attribute 163 * according to the activity type. 162 * Output the `data-bp-activity-id` attribute. 164 163 * 165 164 * @since 10.0.0 166 165 */ 167 166 function bp_nouveau_activity_data_attribute_id() { 168 $attribute = 'data-bp-%1$s-id="%2$s"'; 169 $type = 'activity'; 170 $id = (int) bp_get_activity_id(); 171 $comment_id = (int) bp_get_activity_comment_id(); 172 173 if ( 'activity_comment' === bp_get_activity_type() || $comment_id ) { 174 $type = 'activity-comment'; 175 176 177 if ( $comment_id ) { 178 $id = $comment_id; 179 } 180 } 181 182 printf( $attribute, $type, $id ); 167 printf( 'data-bp-activity-id="%d"', (int) bp_get_activity_id() ); 168 } 169 170 /** 171 * Output the `data-bp-activity-comment-id` attribute. 172 * 173 * @since 12.0.0 174 */ 175 function bp_nouveau_activity_comment_data_attribute_id() { 176 printf( 'data-bp-activity-comment-id="%d"', (int) bp_get_activity_comment_id() ); 183 177 } 184 178 … … 277 271 * @todo This function is too large and needs refactoring and reviewing. 278 272 * @since 3.0.0 279 * 273 * 280 274 * @global BP_Activity_Template $activities_template The Activity template loop. 281 275 * … … 778 772 * 779 773 * @since 3.0.0 780 * 774 * 781 775 * @global BP_Activity_Template $activities_template The Activity template loop. 782 776 *
Note: See TracChangeset
for help on using the changeset viewer.