Skip to:
Content

BuddyPress.org

Changeset 10894


Ignore:
Timestamp:
06/22/2016 09:10:09 PM (8 years ago)
Author:
r-a-y
Message:

Activity: Move activity anchor addition from bp_get_activity_comment_permalink() to bp_get_activity_permalink().

See #7135.

Location:
trunk/src/bp-activity
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-functions.php

    r10869 r10894  
    30313031    } else {
    30323032        if ( 'activity_comment' == $activity_obj->type ) {
    3033             $link = bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $activity_obj->item_id . '/';
     3033            $link = bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $activity_obj->item_id . '/#acomment-' . $activity_obj->id;
    30343034        } else {
    30353035            $link = bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $activity_obj->id . '/';
  • trunk/src/bp-activity/bp-activity-template.php

    r10853 r10894  
    24212421     * @since 1.8.0
    24222422     *
    2423      *
    24242423     * @return string $link The activity comment permalink.
    24252424     */
     
    24272426        global $activities_template;
    24282427
    2429         // Check that comment exists.
     2428        $link = bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity );
     2429
     2430        // Used for filter below.
    24302431        $comment_id = isset( $activities_template->activity->current_comment->id )
    24312432            ? $activities_template->activity->current_comment->id
    24322433            : 0;
    2433 
    2434         // Setup the comment link.
    2435         $comment_link = ! empty( $comment_id )
    2436             ? '#acomment-' .$comment_id
    2437             : false;
    2438 
    2439         // Append comment ID to end of activity permalink.
    2440         $link = bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity ) . $comment_link;
    24412434
    24422435        /**
Note: See TracChangeset for help on using the changeset viewer.