Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/30/2021 01:36:18 AM (4 years ago)
Author:
imath
Message:

Pass expected arguments to Members/Groups Action button filters

To improve extensibility of the 2 functions BP Nouveau uses to generate these action buttons (bp_nouveau_get_members_buttons() & bp_nouveau_get_groups_buttons()), we are adding a new $args parameter to their corresponding filters ('bp_nouveau_get_members_buttons'& 'bp_nouveau_get_groups_buttons').

Doing so should help developers to have better information about the expected output for these buttons.

Props sbrajesh

Fixes #8497

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php

    r12789 r12979  
    44 *
    55 * @since 3.0.0
    6  * @version 6.0.0
     6 * @version 9.0.0
    77 */
    88
     
    10071007         *
    10081008         * @since 3.0.0
     1009         * @since 9.0.0 Adds the `$args` parameter to the filter.
    10091010         *
    10101011         * @param array  $buttons The list of buttons.
    10111012         * @param int    $group   The current group object.
    10121013         * @param string $type    Whether we're displaying a groups loop or a groups single item.
     1014         * @param array  $args    Button arguments.
    10131015         */
    1014         $buttons_group = apply_filters( 'bp_nouveau_get_groups_buttons', $buttons, $group, $type );
     1016        $buttons_group = apply_filters( 'bp_nouveau_get_groups_buttons', $buttons, $group, $type, $args );
    10151017
    10161018        if ( ! $buttons_group ) {
Note: See TracChangeset for help on using the changeset viewer.