Skip to:
Content

BuddyPress.org

Changeset 9450


Ignore:
Timestamp:
02/08/2015 11:05:38 PM (10 years ago)
Author:
tw2113
Message:

Adds hooks documentation to bp-groups-activity.

See #5943.

File:
1 edited

Legend:

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

    r9406 r9450  
    7676    }
    7777
     78    /**
     79     * Fires at end of registration of the default activity actions for the Groups component.
     80     *
     81     * @since BuddyPress (1.1.0)
     82     */
    7883    do_action( 'groups_register_activity_actions' );
    7984}
     
    100105    $action = sprintf( __( '%1$s created the group %2$s', 'buddypress'), $user_link, $group_link );
    101106
     107    /**
     108     * Filters the 'created_group' activity actions.
     109     *
     110     * @since BuddyPress (1.2.0)
     111     *
     112     * @param string $action   The 'created_group' activity action.
     113     * @param object $activity Activity data object.
     114     */
    102115    return apply_filters( 'groups_activity_created_group_action', $action, $activity );
    103116}
     
    134147    }
    135148
     149    /**
     150     * Filters the 'joined_group' activity actions.
     151     *
     152     * @since BuddyPress (2.0.0)
     153     *
     154     * @param string $action   The 'joined_group' activity actions.
     155     * @param object $activity Activity data object.
     156     */
    136157    return apply_filters( 'bp_groups_format_activity_action_joined_group', $action, $activity );
    137158}
     
    179200    }
    180201
     202    /**
     203     * Filters the 'group_details_updated' activity actions.
     204     *
     205     * @since BuddyPress (2.0.0)
     206     *
     207     * @param string $action   The 'group_details_updated' activity actions.
     208     * @param object $activity Activity data object.
     209     */
    181210    return apply_filters( 'bp_groups_format_activity_action_joined_group', $action, $activity );
    182211}
     
    396425    $group = groups_get_group( array( 'group_id' => $group_id ) );
    397426
     427    /**
     428     * Filters the 'membership_accepted' activity actions.
     429     *
     430     * @since BuddyPress (1.2.0)
     431     *
     432     * @param string $value    The 'membership_accepted' activity action.
     433     * @param int    $user_id  ID of the user joining the group.
     434     * @param int    $group_id ID of the group. Passed by reference.
     435     */
     436    $action = apply_filters_ref_array( 'groups_activity_membership_accepted_action', array( sprintf( __( '%1$s joined the group %2$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . esc_attr( $group->name ) . '</a>' ), $user_id, &$group ) );
     437
    398438    // Record in activity streams
    399439    groups_record_activity( array(
    400         'action'  => apply_filters_ref_array( 'groups_activity_membership_accepted_action', array( sprintf( __( '%1$s joined the group %2$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . esc_attr( $group->name ) . '</a>' ), $user_id, &$group ) ),
     440        'action'  => $action,
    401441        'type'    => 'joined_group',
    402442        'item_id' => $group_id,
Note: See TracChangeset for help on using the changeset viewer.