Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/22/2022 11:44:14 AM (3 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-core/deprecated/11.0.php

    r13301 r13302  
    3434    return array();
    3535}
     36
     37/**
     38 * Catch the arguments for buttons
     39 *
     40 * @since 3.0.0
     41 * @deprecated 11.0.0
     42 *
     43 * @param array $button The arguments of the button that BuddyPress is about to create.
     44 *
     45 * @return array An empty array to stop the button creation process.
     46 */
     47function bp_nouveau_groups_catch_button_args( $button = array() ) {
     48    _deprecated_function( __FUNCTION__, '11.0.0' );
     49
     50    /**
     51     * Globalize the arguments so that we can use it
     52     * in bp_nouveau_get_groups_buttons().
     53     */
     54    bp_nouveau()->groups->button_args = $button;
     55
     56    // return an empty array to stop the button creation process
     57    return array();
     58}
Note: See TracChangeset for help on using the changeset viewer.