Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/08/2016 02:38:06 AM (8 years ago)
Author:
boonebgorges
Message:

Introduce bp_activity_excerpt_length().

This function provides a centralized filter for controlling
the length of activity excerpts generated throughout BP.

Props sanket.parmar.
Fixes #7321.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-functions.php

    r11279 r11280  
    31143114
    31153115/**
     3116 * Gets the excerpt length for activity items.
     3117 *
     3118 * @since 2.8.0
     3119 *
     3120 * @return int Character length for activity excerpts.
     3121 */
     3122function 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/**
    31163134 * Create a rich summary of an activity item for the activity stream.
    31173135 *
Note: See TracChangeset for help on using the changeset viewer.