Skip to:
Content

BuddyPress.org

Changeset 8400


Ignore:
Timestamp:
05/08/2014 05:47:33 PM (11 years ago)
Author:
boonebgorges
Message:

Standardize placement of 'bp_get_activity_latest_update_excerpt' filter

When latest activity update excerpts are displayed in the Members directory,
they are displayed like this:

  • "Foo"

instead of just

Foo

The wrapped string is then sent through the 'bp_get_activity_latest_update_excerpt'
filter. However, this creates inconsistencies with other uses of the
filter, which only filter the excerpt itself - not the dash and quotes. This
changeset fixes the inconsistency.

In addition, certain translations of the wrapper string were removing an
erroneous space character from the original string, which had been preventing
the make_clickable() callback from appending the trailing quote to URLs that
appeared at the end of the activity excerpt. In these translations (such as
fr_FR), the result was that the improper filter placement described above was
causing trailing quotation marks to be included as part of URLs when they
appeared at the end of an update string (from the point of view of make_clickable()).
This changeset also removes this extra space, since the bug will no longer
manifest itself in any language.

Fixes #5626

File:
1 edited

Legend:

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

    r8335 r8400  
    851851            return false;
    852852
    853         $update_content = apply_filters( 'bp_get_activity_latest_update_excerpt', sprintf( _x( '- "%s "', 'member latest update in member directory', 'buddypress' ), trim( strip_tags( bp_create_excerpt( $update['content'], $length ) ) ) ) );
     853        $update_content = apply_filters( 'bp_get_activity_latest_update_excerpt', trim( strip_tags( bp_create_excerpt( $update['content'], $length ) ) ) );
     854
     855        $update_content = sprintf( _x( '- "%s"', 'member latest update in member directory', 'buddypress' ), $update_content );
    854856
    855857        // If $view_link is true and the text returned by bp_create_excerpt() is different from the original text (ie it's
Note: See TracChangeset for help on using the changeset viewer.