Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/12/2021 10:36:33 AM (5 years ago)
Author:
imath
Message:

BP Nouveau: improve the function to get activity action buttons

Right After the filter 'bp_nouveau_get_activity_entry_buttons' the function was wrongly returning an array that wasn't the result of the filter when this result was empty.

In this particular case, we simply need to return an empty array.

Props sbrajesh

See #8484 (trunk)

File:
1 edited

Legend:

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

    r12908 r12970  
    44 *
    55 * @since 3.0.0
    6  * @version 8.0.0
     6 * @version 8.1.0
    77 */
    88
     
    237237
    238238    /**
    239      * Get the action buttons inside an Activity Loop,
     239     * Get the action buttons inside an Activity Loop.
    240240     *
    241241     * @todo This function is too large and needs refactoring and reviewing.
    242242     * @since 3.0.0
     243     *
     244     * @param array $args See bp_nouveau_wrapper() for the description of parameters.
     245     * @return array      Activity action buttons used into an Activity Loop.
    243246     */
    244247    function bp_nouveau_get_activity_entry_buttons( $args ) {
     
    531534
    532535        if ( ! $buttons_group ) {
    533             return $buttons;
     536            return array();
    534537        }
    535538
Note: See TracChangeset for help on using the changeset viewer.