bp_core_admin_register_registration_page_fields()
Register registration page fields
Description
Source
File: bp-core/admin/bp-core-admin-pages.php
function bp_core_admin_register_registration_page_fields() {
add_settings_section( 'bp_registration_pages', __( 'Registration Pages', 'buddyboss' ), 'bp_core_admin_registration_pages_description', 'bp-pages' );
$existing_pages = bp_core_get_directory_page_ids();
$static_pages = bp_core_admin_get_static_pages();
$description = '';
foreach ($static_pages as $name => $label) {
$title = $label;
if ( 'register' === $name ) {
$description = 'New users fill out this form to register their accounts.';
} elseif ( 'terms' === $name ) {
$description = 'If a page is added, its contents will display in a popup on the register form.';
} elseif ( 'privacy' === $name ) {
$description = 'If a page is added, its contents will display in a popup on the register form.';
} elseif ( 'activate' === $name ) {
$description = 'After registering, users are sent to this page to activate their accounts.';
}
if ( 'button' === $name ) {
$title = '';
}
add_settings_field( $name, $title, 'bp_admin_setting_callback_page_directory_dropdown', 'bp-pages', 'bp_registration_pages', compact('existing_pages', 'name', 'label', 'description' ) );
register_setting( 'bp-pages', $name, [] );
}
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.