Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2024 07:06:30 PM (18 months ago)
Author:
espellcaste
Message:

Signup: deprecate bp_signup_allowed function.

Props imath.

Closes https://github.com/buddypress/buddypress/pull/397
Fixes #9250

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-template.php

    r14071 r14073  
    30463046
    30473047/**
    3048  * Output whether signup is allowed.
     3048 * Is user signup allowed?
    30493049 *
    30503050 * @since 1.1.0
    30513051 *
    3052  * @todo Remove this function. Echoing a bool is pointless.
    3053  */
    3054 function bp_signup_allowed() {
    3055     // phpcs:ignore WordPress.Security.EscapeOutput
    3056     echo bp_get_signup_allowed();
    3057 }
    3058     /**
    3059      * Is user signup allowed?
    3060      *
    3061      * @since 1.1.0
    3062      *
    3063      * @return bool
    3064      */
    3065     function bp_get_signup_allowed() {
    3066 
    3067         /**
    3068          * Filters whether new signups are allowed.
    3069          *
    3070          * @since 1.5.0
    3071          *
    3072          * @param bool $signup_allowed Whether or not new signups are allowed.
    3073          */
    3074         return apply_filters( 'bp_get_signup_allowed', (bool) bp_get_option( 'users_can_register' ) );
    3075     }
     3052 * @return bool
     3053 */
     3054function bp_get_signup_allowed() {
     3055
     3056    /**
     3057     * Filters whether new signups are allowed.
     3058     *
     3059     * @since 1.5.0
     3060     *
     3061     * @param bool $signup_allowed Whether or not new signups are allowed.
     3062     */
     3063    return apply_filters( 'bp_get_signup_allowed', (bool) bp_get_option( 'users_can_register' ) );
     3064}
    30763065
    30773066/**
Note: See TracChangeset for help on using the changeset viewer.