Skip to:
Content

BuddyPress.org

Changeset 7397


Ignore:
Timestamp:
10/08/2013 08:57:54 PM (11 years ago)
Author:
boonebgorges
Message:

Inline doc improvements in bp-activity-filters.php

See #5022

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-filters.php

    r7228 r7397  
    22
    33/**
    4  * The Activity filters
     4 * Filters related to the Activity component.
    55 *
    66 * @package BuddyPress
     
    7979add_filter( 'bp_activity_primary_link_before_save',  'esc_url_raw' );
    8080
    81 // Apply BuddyPress defined filters
     81// Apply BuddyPress-defined filters
    8282add_filter( 'bp_get_activity_content',               'bp_activity_make_nofollow_filter' );
    8383add_filter( 'bp_get_activity_content_body',          'bp_activity_make_nofollow_filter' );
     
    109109
    110110/**
    111  * Types of activity stream items to check against
     111 * Types of activity stream items to moderate.
    112112 *
    113113 * @since BuddyPress (1.6)
     114 *
     115 * @return array $types List of the activity types to moderate.
    114116 */
    115117function bp_activity_get_moderated_activity_types() {
     
    122124
    123125/**
    124  * Check activity stream for moderation keys
     126 * Moderate the posted activity item, if it contains moderate keywords.
    125127 *
    126128 * @since BuddyPress (1.6)
    127  * @param BP_Activity_Activity $activity
     129 *
     130 * @param BP_Activity_Activity $activity The activity object to check.
    128131 */
    129132function bp_activity_check_moderation_keys( $activity ) {
     
    140143
    141144/**
    142  * Check activity stream for blacklisted keys
     145 * Mark the posted activity as spam, if it contains blacklist keywords.
    143146 *
    144147 * @since BuddyPress (1.6)
    145  * @param BP_Activity_Activity $activity
     148 *
     149 * @param BP_Activity_Activity $activity The activity object to check.
    146150 */
    147151function bp_activity_check_blacklist_keys( $activity ) {
     
    157161
    158162/**
    159  * Custom kses filtering for activity content
     163 * Custom kses filtering for activity content.
    160164 *
    161165 * @since BuddyPress (1.1)
    162  *
    163  * @param string $content The activity content
    164166 *
    165167 * @uses apply_filters() To call the 'bp_activity_allowed_tags' hook.
    166168 * @uses wp_kses()
    167169 *
    168  * @return string $content Filtered activity content
     170 * @param string $content The activity content.
     171 * @return string $content Filtered activity content.
    169172 */
    170173function bp_activity_filter_kses( $content ) {
     
    197200 * @since BuddyPress (1.2)
    198201 *
     202 * @uses bp_activity_find_mentions()
     203 * @uses bp_core_get_user_domain()
     204 *
    199205 * @param string $content The contents of a given item.
    200206 * @param int $activity_id The activity id. Deprecated.
    201  *
    202  * @uses bp_activity_find_mentions()
    203  * @uses bp_core_get_user_domain()
    204  *
    205  * @return string $content Content filtered for mentions
     207 * @return string $content Content filtered for mentions.
    206208 */
    207209function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
     
    229231
    230232/**
    231  * Catch mentions in activity items before they are saved into the database.
     233 * Catch mentions in an activity item before it is saved into the database.
    232234 *
    233235 * If mentions are found, replace @mention text with user links and add our
    234  * hook to send mentions after the activity item is saved.
     236 * hook to send mention notifications after the activity item is saved.
    235237 *
    236238 * @since BuddyPress (1.5)
    237239 *
     240 * @uses bp_activity_find_mentions()
     241 *
    238242 * @param BP_Activity_Activity $activity
    239  *
    240  * @uses bp_activity_find_mentions()
    241243 */
    242244function bp_activity_at_name_filter_updates( $activity ) {
     
    269271
    270272/**
    271  * Sends emails and BP notifications for @-mentioned users in the contents of
    272  * an activity item.
     273 * Sends emails and BP notifications for users @-mentioned in an activity item.
    273274 *
    274275 * @since BuddyPress (1.7)
    275  *
    276  * @param BP_Activity_Activity $activity The BP_Activity_Activity object
    277276 *
    278277 * @uses bp_activity_at_message_notification()
    279278 * @uses bp_activity_update_mention_count_for_user()
     279 *
     280 * @param BP_Activity_Activity $activity The BP_Activity_Activity object
    280281 */
    281282function bp_activity_at_name_send_emails( $activity ) {
     
    308309
    309310/**
    310  * Catches links in activity text so rel=nofollow can be added
     311 * Catch links in activity text so rel=nofollow can be added.
    311312 *
    312313 * @since BuddyPress (1.2)
    313314 *
    314  * @param string $text Activity text
    315  *
    316  * @return string $text Text with rel=nofollow added to any links
     315 * @param string $text Activity text.
     316 * @return string $text Text with rel=nofollow added to any links.
    317317 */
    318318function bp_activity_make_nofollow_filter( $text ) {
     
    321321
    322322    /**
    323      * Adds rel=nofollow to a link
     323     * Add rel=nofollow to a link.
    324324     *
    325325     * @since BuddyPress (1.2)
     
    327327     * @param array $matches
    328328     *
     329     * @param array $matches Items matched by preg_replace_callback() in bp_activity_make_nofollow_filter().
    329330     * @return string $text Link with rel=nofollow added
    330331     */
     
    336337
    337338/**
    338  * Truncates long activity entries when viewed in activity streams
     339 * Truncate long activity entries when viewed in activity streams.
    339340 *
    340341 * @since BuddyPress (1.5)
    341342 *
    342  * @param string $text The original activity entry text
    343  *
    344343 * @uses bp_is_single_activity()
    345  * @uses apply_filters() To call the 'bp_activity_excerpt_append_text' hook
    346  * @uses apply_filters() To call the 'bp_activity_excerpt_length' hook
     344 * @uses apply_filters() To call the 'bp_activity_excerpt_append_text' hook.
     345 * @uses apply_filters() To call the 'bp_activity_excerpt_length' hook.
    347346 * @uses bp_create_excerpt()
    348347 * @uses bp_get_activity_id()
    349348 * @uses bp_get_activity_thread_permalink()
    350  * @uses apply_filters() To call the 'bp_activity_truncate_entry' hook
    351  *
    352  * @return string $excerpt The truncated text
     349 * @uses apply_filters() To call the 'bp_activity_truncate_entry' hook.
     350 *
     351 * @param string $text The original activity entry text.
     352 * @return string $excerpt The truncated text.
    353353 */
    354354function bp_activity_truncate_entry( $text ) {
Note: See TracChangeset for help on using the changeset viewer.