Changeset 11280
- Timestamp:
- 12/08/2016 02:38:06 AM (8 years ago)
- Location:
- trunk/src/bp-activity
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-filters.php
r11256 r11280 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' ) ) ); -
trunk/src/bp-activity/bp-activity-functions.php
r11279 r11280 3114 3114 3115 3115 /** 3116 * Gets the excerpt length for activity items. 3117 * 3118 * @since 2.8.0 3119 * 3120 * @return int Character length for activity excerpts. 3121 */ 3122 function bp_activity_get_excerpt_length() { 3123 /** 3124 * Filters the excerpt length for the activity excerpt. 3125 * 3126 * @since 1.5.0 3127 * 3128 * @param int Character length for activity excerpts. 3129 */ 3130 return (int) apply_filters( 'bp_activity_excerpt_length', 358 ); 3131 } 3132 3133 /** 3116 3134 * Create a rich summary of an activity item for the activity stream. 3117 3135 * -
trunk/src/bp-activity/bp-activity-template.php
r11091 r11280 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(
Note: See TracChangeset
for help on using the changeset viewer.