bp_blog_signup_enabled()
Checks whether blog creation is enabled.
Description Description
Returns true when blog creation is enabled for logged-in users only, or when it’s enabled for new registrations.
Return Return
(bool) True if blog registration is enabled.
Source Source
File: bp-blogs/bp-blogs-functions.php
function bp_blog_signup_enabled() { $bp = buddypress(); $retval = true; $active_signup = 'all'; if ( isset( $bp->site_options['registration'] ) ) { $active_signup = $bp->site_options['registration']; } /** * Filters whether or not blog creation is enabled. * * Return "all", "none", "blog" or "user". * * @since 1.0.0 * * @param string $active_signup Value of the registration site option creation status. */ $active_signup = apply_filters( 'wpmu_active_signup', $active_signup ); if ( 'none' === $active_signup || 'user' === $active_signup ) { $retval = false; } return $retval; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
7.0.0 | The function has been moved into bp-blogs/bp-blogs-functions.php . |
1.0.0 | Introduced. |