' );
}
// Format final content.
return sprintf(
'%1$s
%2$s %3$s
',
$content_img,
$post_title,
wpautop( $excerpt )
);
}
// Handle blog comments.
elseif ( 'new_blog_comment' === $activity->type && $activity->secondary_item_id > 0 ) {
$comment = get_comment( $activity->secondary_item_id );
if ( ! $comment ) {
return $content;
}
$content = bp_create_excerpt( html_entity_decode( $comment->comment_content ) );
// Check if comment excerpt has ellipsis and add read more link if it does.
if ( false !== strpos( $content, __( '…', 'buddyx' ) ) ) {
$content = str_replace( ' […]', '…', $content );
$append_text = apply_filters( 'bp_activity_excerpt_append_text', __( ' Read more', 'buddyx' ) );
return wpautop(
sprintf(
'%1$s
%3$s',
$content,
get_comment_link( $activity->secondary_item_id ),
$append_text
)
);
}
return wpautop( $content );
}
}
return $content;
}
if ( ! function_exists( 'buddyx_viewport_meta' ) ) {
/**
* Add a viewport meta
*/
function buddyx_viewport_meta() {
echo '
';
}
// add_action( 'wp_head', 'buddyx_viewport_meta' );
}