Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/22/2022 10:50:40 AM (3 years ago)
Author:
imath
Message:

Introduce a function to only get the Friendship button arguments

bp_get_add_friend_button_args() eases the process of getting these arguments and removes the need for BP Nouveau's workaround.
Deprecate the bp_nouveau_members_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/members/functions.php

    r13136 r13301  
    159159
    160160/**
    161  * Catch the arguments for buttons
    162  *
    163  * @since 3.0.0
    164  *
    165  * @param array $buttons The arguments of the button that BuddyPress is about to create.
    166  *
    167  * @return array An empty array to stop the button creation process.
    168  */
    169 function bp_nouveau_members_catch_button_args( $button = array() ) {
    170     /*
    171      * Globalize the arguments so that we can use it
    172      * in bp_nouveau_get_member_header_buttons().
    173      */
    174     bp_nouveau()->members->button_args = $button;
    175 
    176     // return an empty array to stop the button creation process
    177     return array();
    178 }
    179 
    180 /**
    181161 * Catch the content hooked to the do_action hooks in single member header
    182162 * and in the members loop.
Note: See TracChangeset for help on using the changeset viewer.