Changeset 911
- Timestamp:
- 01/23/2009 08:04:13 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r907 r911 763 763 * @return str The excerpt text 764 764 */ 765 function bp_create_excerpt( $text, $excerpt_length = 55 ) { // Fakes an excerpt if needed765 function bp_create_excerpt( $text, $excerpt_length = 55, $filter_shortcodes = true ) { // Fakes an excerpt if needed 766 766 $text = str_replace(']]>', ']]>', $text); 767 767 $text = strip_tags($text); 768 $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text ); 768 769 if ( $filter_shortcodes ) 770 $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text ); 769 771 770 772 $words = explode(' ', $text, $excerpt_length + 1); … … 1273 1275 add_action( 'bp_core_render_notice', 'bp_core_clear_cache' ); 1274 1276 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 1275 1280 ?> -
trunk/bp-forums/bp-forums-templatetags.php
r691 r911 239 239 240 240 $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 ); 242 243 } 243 244 -
trunk/bp-groups.php
r910 r911 948 948 $group_link = bp_group_permalink( $group, false ); 949 949 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 ) ); 951 951 952 952 $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>'; … … 973 973 $group_link = bp_group_permalink( $group, false ); 974 974 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 ) ); 976 976 977 977 $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.