Skip to:
Content

BuddyPress.org

Changeset 13447


Ignore:
Timestamp:
04/04/2023 01:58:33 AM (14 months ago)
Author:
imath
Message:

Disable single items loop's action buttons when their args are emptied
In BP Nouveau template pack, if some custom code is resetting single items loop's action buttons arguments using the bp_nouveau_get_groups_buttons or bp_nouveau_get_groups_buttons filters, instead of returning the default button arguments (which outputs are not yet generated) simply return an empty array.

Props raviousprime

Fixes #8865

Location:
trunk/src/bp-templates/bp-nouveau/includes
Files:
2 edited

Legend:

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

    r13437 r13447  
    44 *
    55 * @since 3.0.0
    6  * @version 10.0.0
     6 * @version 12.0.0
    77 */
    88
     
    10081008         */
    10091009        $buttons_group = apply_filters( 'bp_nouveau_get_groups_buttons', $buttons, $group, $type, $args );
    1010 
    10111010        if ( ! $buttons_group ) {
    1012             return $buttons;
     1011            return array();
    10131012        }
    10141013
  • trunk/src/bp-templates/bp-nouveau/includes/members/template-tags.php

    r13409 r13447  
    44 *
    55 * @since 3.0.0
    6  * @version 10.3.0
     6 * @version 12.0.0
    77 */
    88
     
    436436        $buttons_group = apply_filters( 'bp_nouveau_get_members_buttons', $buttons, $user_id, $type, $args );
    437437        if ( ! $buttons_group ) {
    438             return $buttons;
     438            return array();
    439439        }
    440440
Note: See TracChangeset for help on using the changeset viewer.