Changeset 5030
- Timestamp:
- 08/24/2011 07:18:57 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r4989 r5030 483 483 484 484 return apply_filters( 'bp_create_excerpt', $truncate, $original_text, $length, $options ); 485 } 486 add_filter( 'bp_create_excerpt', 'wp_trim_excerpt' ); 485 486 } 487 487 add_filter( 'bp_create_excerpt', 'stripslashes_deep' ); 488 488 add_filter( 'bp_create_excerpt', 'force_balance_tags' ); -
trunk/bp-forums/bp-forums-template.php
r4961 r5030 724 724 725 725 $defaults = array( 726 'length' => 45726 'length' => 225 727 727 ); 728 728 … … 732 732 $post = bp_forums_get_post( $forum_template->topic->topic_last_post_id ); 733 733 $post = bp_create_excerpt( $post->post_text, $length ); 734 return apply_filters( 'bp_get_the_topic_latest_post_excerpt', $post ); 734 735 return apply_filters( 'bp_get_the_topic_latest_post_excerpt', $post, $length ); 735 736 } 736 737 737 738 function bp_the_topic_time_since_last_post() { 738 global $forum_template;739 740 739 echo bp_get_the_topic_time_since_last_post(); 741 740 } -
trunk/bp-groups/bp-groups-template.php
r4998 r5030 504 504 $group =& $groups_template->group; 505 505 506 return apply_filters( 'bp_get_group_description_excerpt', bp_create_excerpt( $group->description , 20) );506 return apply_filters( 'bp_get_group_description_excerpt', bp_create_excerpt( $group->description ) ); 507 507 } 508 508 -
trunk/bp-members/bp-members-template.php
r4961 r5030 571 571 572 572 $defaults = array( 573 'length' => 70,573 'length' => 225, 574 574 'view_link' => true 575 575 ); 576 576 577 577 $r = wp_parse_args( $args, $defaults ); 578 extract( $r , EXTR_SKIP);579 580 if ( !isset( $members_template->member->latest_update ) || !$update = maybe_unserialize( $members_template->member->latest_update ) )578 extract( $r ); 579 580 if ( empty( $members_template->member->latest_update ) || !$update = maybe_unserialize( $members_template->member->latest_update ) ) 581 581 return false; 582 582 583 $update_content = apply_filters( 'bp_get_activity_latest_update', sprintf( _x( '- "%s"', 'member latest update in member directory', 'buddypress' ), trim( strip_tags( bp_create_excerpt( $update['content'], $length ) ) ) ) ); 584 585 if ( $view_link && !empty( $update['id'] ) && bp_is_active( 'activity' ) ) 586 $update_content .= ' <a href="' . bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $update['id'] . '">' . __( 'View', 'buddypress' ) . '</a>'; 583 $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 ) ) ) ) ); 584 585 // If $view_link is true and the text returned by bp_create_excerpt() is different from the original text (ie it's 586 // been truncated), add the "View" link. 587 if ( $view_link && ( $update_content != $update['content'] ) ) { 588 $view = __( 'View', 'buddypress' ); 589 590 $update_content .= '<span class="activity-read-more"><a href="' . bp_activity_get_permalink( $update['id'] ) . '" rel="nofollow">' . $view . '</a></span>'; 591 } 587 592 588 593 return apply_filters( 'bp_get_member_latest_update', $update_content ); -
trunk/bp-themes/bp-default/members/members-loop.php
r4858 r5030 49 49 <?php if ( bp_get_member_latest_update() ) : ?> 50 50 51 <span class="update"> <?php bp_member_latest_update( array( 'length' => 10, 'view_link' => false )); ?></span>51 <span class="update"> <?php bp_member_latest_update(); ?></span> 52 52 53 53 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.