Skip to:
Content

BuddyPress.org

Changeset 4356


Ignore:
Timestamp:
05/14/2011 12:08:08 PM (14 years ago)
Author:
djpaul
Message:

Change bp_create_excerpt to use a WP core function for stripping registered shortcodes. Fixes #2420

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-template.php

    r4301 r4356  
    475475 * @param $text str The text to create the excerpt from
    476476 * @param $excerpt_length Minimum excerpt length, in characters
    477  * @param $filter_shortcodes When true, apparent shortcodes (in square brackets) will be stripped
     477 * @param $filter_shortcodes When true, registered shortcodes (in square brackets) will be stripped
    478478 * @param $append_text Be sure to include a leading space
    479479 * @return str The excerpt text
     
    487487
    488488    if ( $filter_shortcodes )
    489         $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
     489        $text = strip_shortcodes( $text );
    490490
    491491    preg_match( "%\s*((?:<[^>]+>)+\S*)\s*|\s+%s", $text, $matches, PREG_OFFSET_CAPTURE, $excerpt_length );
Note: See TracChangeset for help on using the changeset viewer.