Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/22/2022 12:54:40 PM (3 years ago)
Author:
imath
Message:

Introduce a function to only get the "Visit blog" button args

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

Props hnla

Fixes #7126
See #8722

File:
1 edited

Legend:

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

    r12908 r13303  
    117117
    118118/**
    119  * Catch the arguments for buttons
    120  *
    121  * @since 3.0.0
    122  *
    123  * @param array $buttons The arguments of the button that BuddyPress is about to create.
    124  *
    125  * @return array An empty array to stop the button creation process.
    126  */
    127 function bp_nouveau_blogs_catch_button_args( $button = array() ) {
    128     // Globalize the arguments so that we can use it  in bp_nouveau_get_blogs_buttons().
    129     bp_nouveau()->blogs->button_args = $button;
    130 
    131     // return an empty array to stop the button creation process
    132     return array();
    133 }
    134 
    135 /**
    136119 * Add settings to the customizer for the blogs component.
    137120 *
Note: See TracChangeset for help on using the changeset viewer.