Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/05/2014 10:08:49 PM (10 years ago)
Author:
djpaul
Message:

Activity: refactor part of bp_get_activity_latest_update to use bp_activity_get_permalink to get a link to an activity item rather than manually constructing the link.

See #5926

File:
1 edited

Legend:

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

    r9043 r9063  
    26722672
    26732673        $latest_update = apply_filters( 'bp_get_activity_latest_update_excerpt', trim( strip_tags( bp_create_excerpt( $update['content'], 358 ) ) ) );
    2674         $latest_update .= ' <a href="' . bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $update['id'] . '/"> ' . __( 'View', 'buddypress' ) . '</a>';
    2675 
    2676         return apply_filters( 'bp_get_activity_latest_update', $latest_update  );
     2674
     2675        $latest_update = sprintf(
     2676            '%s <a href="%s">%s</a>',
     2677            $latest_update,
     2678            esc_url_raw( bp_activity_get_permalink( $update['id'] ) ),
     2679            esc_attr__( 'View', 'buddypress' )
     2680        );
     2681
     2682        return apply_filters( 'bp_get_activity_latest_update', $latest_update );
    26772683    }
    26782684
Note: See TracChangeset for help on using the changeset viewer.