Skip to:
Content

BuddyPress.org

Changeset 911


Ignore:
Timestamp:
01/23/2009 08:04:13 PM (16 years ago)
Author:
apeatling
Message:

Fixes #385

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r907 r911  
    763763 * @return str The excerpt text
    764764 */
    765 function bp_create_excerpt( $text, $excerpt_length = 55 ) { // Fakes an excerpt if needed
     765function bp_create_excerpt( $text, $excerpt_length = 55, $filter_shortcodes = true ) { // Fakes an excerpt if needed
    766766    $text = str_replace(']]>', ']]>', $text);
    767767    $text = strip_tags($text);
    768     $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
     768   
     769    if ( $filter_shortcodes )
     770        $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
    769771   
    770772    $words = explode(' ', $text, $excerpt_length + 1);
     
    12731275add_action( 'bp_core_render_notice', 'bp_core_clear_cache' );
    12741276
     1277// Remove the catch non existent blogs hook so WPMU doesn't think BuddyPress pages are non existing blogs
     1278//remove_action( 'plugins_loaded', 'catch_nonexistant_blogs' );
     1279
    12751280?>
  • trunk/bp-forums/bp-forums-templatetags.php

    r691 r911  
    239239   
    240240    $posts = bp_forums_get_posts( $forum_template->topic->topic_id );
    241     echo apply_filters( 'bp_the_topic_latest_post_excerpt', bp_create_excerpt( $posts[count($posts) - 1]['post_text'] ) );
     241    echo "test";
     242    echo apply_filters( 'bp_the_topic_latest_post_excerpt', bp_create_excerpt( $posts[count($posts) - 1]['post_text'] ), 55, false );
    242243}
    243244
  • trunk/bp-groups.php

    r910 r911  
    948948                $group_link = bp_group_permalink( $group, false );
    949949
    950                 $post_content = apply_filters( 'bp_the_topic_post_content', bp_create_excerpt( stripslashes( $forum_post['post_text'] ) ) );
     950                $post_content = apply_filters( 'bp_the_topic_post_content', bp_create_excerpt( stripslashes( $forum_post['post_text'] ), 55, false ) );
    951951           
    952952                $content = sprintf ( __('%s posted on the forum topic %s in the group %s:', 'buddypress'), $user_link, '<a href="' . $group_link . '/forum/topic/' . $forum_topic['topic_id'] . '">' . $forum_topic['topic_title'] . '</a>', '<a href="' . $group_link . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>';           
     
    973973                $group_link = bp_group_permalink( $group, false );
    974974               
    975                 $post_content = apply_filters( 'bp_the_topic_post_content', bp_create_excerpt( stripslashes( $forum_post['post_text'] ) ) );
     975                $post_content = apply_filters( 'bp_the_topic_post_content', bp_create_excerpt( stripslashes( $forum_post['post_text'] ), 55, false ) );
    976976               
    977977                $content = sprintf ( __('%s created the forum topic %s in the group %s:', 'buddypress'), $user_link, '<a href="' . $group_link . '/forum/topic/' . $forum_topic['topic_id'] . '">' . $forum_topic['topic_title'] . '</a>', '<a href="' . $group_link . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>';         
Note: See TracChangeset for help on using the changeset viewer.