Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/29/2014 06:07:00 AM (12 years ago)
Author:
tw2113
Message:

Adding hooks documentation for bp-xprofile-activity.php.

See #5949

File:
1 edited

Legend:

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

    r9273 r9286  
    4343        );
    4444
     45        /**
     46         * Fires after the registration of default activity actions for Extended Profile component.
     47         *
     48         * @since BuddyPress (1.1.0)
     49         */
    4550        do_action( 'xprofile_register_activity_actions' );
    4651}
     
    6570        }
    6671
     72        /**
     73         * Filters the formatted 'new_avatar' activity stream action.
     74         *
     75         * @since BuddyPress (2.0.0)
     76         *
     77         * @param string $action   Formatted action for activity stream.
     78         * @param object $activity Activity object.
     79         */
    6780        return apply_filters( 'bp_xprofile_format_activity_action_new_avatar', $action, $activity );
    6881}
     
    8699        $action       = sprintf( __( '%s&#8217;s profile was updated', 'buddypress' ), '<a href="' . $profile_link . '">' . bp_core_get_user_displayname( $activity->user_id ) . '</a>' );
    87100
     101        /**
     102         * Filters the formatted 'updated_profile' activity stream action.
     103         *
     104         * @since BuddyPress (2.0.0)
     105         *
     106         * @param string $action   Formatted action for activity stream.
     107         * @param object $activity Activity object.
     108         */
    88109        return apply_filters( 'bp_xprofile_format_activity_action_updated_profile', $action, $activity );
    89110}
     
    167188        }
    168189
     190        /**
     191         * Filters the return value of bp_activity_set_action.
     192         *
     193         * @since BuddyPress (1.1.0)
     194         *
     195         * @param bool   $value Whether or not an action was successfully registered.
     196         * @param string $key   Key used for the registered action.
     197         * @param string $value Value used for the registered action.
     198         */
    169199        return apply_filters( 'xprofile_register_activity_action', bp_activity_set_action( buddypress()->profile->id, $key, $value ), $key, $value );
    170200}
     
    186216        }
    187217
    188         // Allow user ID to be filtered
     218        /**
     219         * Filters the user ID when a user has ploaded a new avatar.
     220         *
     221         * @since BuddyPress (1.5.0)
     222         *
     223         * @param int $value ID of the displayed user.
     224         */
    189225        $user_id = apply_filters( 'bp_xprofile_new_avatar_user_id', bp_displayed_user_id() );
    190226
     
    263299        // Default throttle time is 2 hours. Filter to change (in seconds)
    264300        if ( ! empty( $existing['activities'] ) ) {
     301
     302                /**
     303                 * Filters the throttle time, in seconds, used to prevent excessive activity posting.
     304                 *
     305                 * @since BuddyPress (2.0.0)
     306                 *
     307                 * @param int $value Throttle time, in seconds.
     308                 */
    265309                $throttle_period = apply_filters( 'bp_xprofile_updated_profile_activity_throttle_time', HOUR_IN_SECONDS * 2 );
    266310                $then            = strtotime( $existing['activities'][0]->date_recorded );
Note: See TracChangeset for help on using the changeset viewer.