Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2023 04:37:33 AM (13 months ago)
Author:
imath
Message:

Add a function to output the bp-activity-comment-id data attribute

In BP Nouveau, instead of using the same function to output the bp-activity-comment-id or bp-activity-id data attribute according to the activity type, introduce the bp_nouveau_activity_comment_data_attribute_id() function and use it inside the activity/comment.php template.
This prevents a notice warning notice and avoid to query for the parent activity to get the right activity type.

Props vapvarun

Fixes #9014
Closes https://github.com/buddypress/buddypress/pull/182

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress/activity/comment.php

    r13114 r13631  
    77 *
    88 * @since 3.0.0
    9  * @version 10.0.0
     9 * @version 12.0.0
    1010 */
    1111
    1212bp_nouveau_activity_hook( 'before', 'comment' ); ?>
    1313
    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(); ?>>
    1515    <div class="acomment-avatar item-avatar">
    1616        <a href="<?php bp_activity_comment_user_link(); ?>">
Note: See TracChangeset for help on using the changeset viewer.