Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/22/2022 12:54:40 PM (2 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-core/deprecated/11.0.php

    r13302 r13303  
    5757    return array();
    5858}
     59
     60/**
     61 * Catch the arguments for buttons
     62 *
     63 * @since 3.0.0
     64 * @deprecated 11.0.0
     65 *
     66 * @param array $buttons The arguments of the button that BuddyPress is about to create.
     67 *
     68 * @return array An empty array to stop the button creation process.
     69 */
     70function bp_nouveau_blogs_catch_button_args( $button = array() ) {
     71    _deprecated_function( __FUNCTION__, '11.0.0' );
     72
     73    // Globalize the arguments so that we can use it  in bp_nouveau_get_blogs_buttons().
     74    bp_nouveau()->blogs->button_args = $button;
     75
     76    // return an empty array to stop the button creation process
     77    return array();
     78}
Note: See TracChangeset for help on using the changeset viewer.