Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/19/2016 03:30:42 AM (10 years ago)
Author:
boonebgorges
Message:

Pass $user_id to a number of Activity filter templates.

Props Offereins.
See #6997.

File:
1 edited

Legend:

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

    r10652 r10784  
    28802880                 *
    28812881                 * @since 1.2.10
    2882                  *
    2883                  * @param string $value The excerpt for the latest update.
    2884                  */
    2885                 $latest_update = apply_filters( 'bp_get_activity_latest_update_excerpt', trim( strip_tags( bp_create_excerpt( $update['content'], 358 ) ) ) );
     2882                 * @since 2.6.0  Added the `$user_id` parameter.
     2883                 *
     2884                 * @param string $value   The excerpt for the latest update.
     2885                 * @param int    $user_id ID of the queried user.
     2886                 */
     2887                $latest_update = apply_filters( 'bp_get_activity_latest_update_excerpt', trim( strip_tags( bp_create_excerpt( $update['content'], 358 ) ) ), $user_id );
    28862888
    28872889                $latest_update = sprintf(
     
    28962898                 *
    28972899                 * @since 1.2.0
     2900                 * @since 2.6.0 Added the `$user_id` parameter.
    28982901                 *
    28992902                 * @param string $latest_update The latest update with "view" link appended to it.
    2900                  */
    2901                 return apply_filters( 'bp_get_activity_latest_update', $latest_update );
     2903                 * @param int    $user_id       ID of the queried user.
     2904                 */
     2905                return apply_filters( 'bp_get_activity_latest_update', $latest_update, $user_id );
    29022906        }
    29032907
     
    31693173                 *
    31703174                 * @since 1.2.0
    3171                  *
    3172                  * @param int|bool $retval Total favorite count for a user. False on no favorites.
    3173                  */
    3174                 return apply_filters( 'bp_get_total_favorite_count_for_user', $retval );
     3175                 * @since 2.6.0 Added the `$user_id` parameter.
     3176                 *
     3177                 * @param int|bool $retval  Total favorite count for a user. False on no favorites.
     3178                 * @param int      $user_id ID of the queried user.
     3179                 */
     3180                return apply_filters( 'bp_get_total_favorite_count_for_user', $retval, $user_id );
    31753181        }
    31763182
     
    32173223                 *
    32183224                 * @since 1.2.0
    3219                  *
    3220                  * @param int|bool $retval Total mention count for a user. False on no mentions.
    3221                  */
    3222                 return apply_filters( 'bp_get_total_mention_count_for_user', $retval );
     3225                 * @since 2.6.0 Added the `$user_id` parameter.
     3226                 *
     3227                 * @param int|bool $retval  Total mention count for a user. False on no mentions.
     3228                 * @param int      $user_id ID of the queried user.
     3229                 */
     3230                return apply_filters( 'bp_get_total_mention_count_for_user', $retval, $user_id );
    32233231        }
    32243232
Note: See TracChangeset for help on using the changeset viewer.