Ticket #7321: 7321.patch
File 7321.patch, 2.3 KB (added by , 8 years ago) |
---|
-
bp-activity/bp-activity-filters.php
450 450 */ 451 451 $append_text = apply_filters( 'bp_activity_excerpt_append_text', __( '[Read more]', 'buddypress' ) ); 452 452 453 /** 454 * Filters the excerpt length for the activity excerpt. 455 * 456 * @since 1.5.0 457 * 458 * @param int $value Number indicating how many words to trim the excerpt down to. 459 */ 460 $excerpt_length = apply_filters( 'bp_activity_excerpt_length', 358 ); 453 $excerpt_length = bp_activity_get_excerpt_length(); 461 454 462 455 $args = wp_parse_args( $args, array( 'ending' => __( '…', 'buddypress' ) ) ); 463 456 -
bp-activity/bp-activity-template.php
2697 2697 * @param string $value The excerpt for the latest update. 2698 2698 * @param int $user_id ID of the queried user. 2699 2699 */ 2700 $latest_update = apply_filters( 'bp_get_activity_latest_update_excerpt', trim( strip_tags( bp_create_excerpt( $update['content'], 358) ) ), $user_id );2700 $latest_update = apply_filters( 'bp_get_activity_latest_update_excerpt', trim( strip_tags( bp_create_excerpt( $update['content'], bp_activity_get_excerpt_length() ) ) ), $user_id ); 2701 2701 2702 2702 $latest_update = sprintf( 2703 2703 '%s <a href="%s">%s</a>', -
bp-core/bp-core-template.php
840 840 } 841 841 842 842 /** 843 * Get excerpt length for the activity. 844 * 845 * @since 2.8.0 846 * 847 * @return int Number indicating how many words to trim the excerpt down to. 848 */ 849 function bp_activity_get_excerpt_length() { 850 851 /** 852 * Filters the excerpt length for the activity excerpt. 853 * 854 * @since 2.8.0 855 * 856 * @param int $value Number indicating how many words to trim the excerpt down to. 857 */ 858 return apply_filters( 'bp_activity_excerpt_length', 358 ); 859 860 } 861 862 /** 843 863 * Truncate text. 844 864 * 845 865 * Cuts a string to the length of $length and replaces the last characters