Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/22/2022 11:44:14 AM (4 years ago)
Author:
imath
Message:

Introduce a function to only get the "Join/Leave Group" button args

bp_groups_get_group_join_button_args() eases the process of getting these arguments and removes the need for BP Nouveau's workaround.
Deprecate the bp_nouveau_groups_catch_button_args() as no more needed.

Props hnla

See #7126
See #8722

File:
1 edited

Legend:

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

    r13192 r13302  
    661661
    662662/**
    663  * Catch the arguments for buttons
    664  *
    665  * @since 3.0.0
    666  *
    667  * @param array $button The arguments of the button that BuddyPress is about to create.
    668  *
    669  * @return array An empty array to stop the button creation process.
    670  */
    671 function bp_nouveau_groups_catch_button_args( $button = array() ) {
    672         /**
    673          * Globalize the arguments so that we can use it
    674          * in bp_nouveau_get_groups_buttons().
    675          */
    676         bp_nouveau()->groups->button_args = $button;
    677 
    678         // return an empty array to stop the button creation process
    679         return array();
    680 }
    681 
    682 /**
    683663 * Catch the content hooked to the 'bp_group_header_meta' action
    684664 *
Note: See TracChangeset for help on using the changeset viewer.