bp_core_admin_register_page_fields()
Register page fields
Description
Source
File: bp-core/admin/bp-core-admin-pages.php
function bp_core_admin_register_page_fields() { $existing_pages = bp_core_get_directory_page_ids(); $directory_pages = bp_core_admin_get_directory_pages(); $description = ''; add_settings_section( 'bp_pages', __( 'Component Pages', 'buddyboss' ), 'bp_core_admin_directory_pages_description', 'bp-pages' ); foreach ($directory_pages as $name => $label) { if ( 'members' === $name ) { $description = 'This directory shows a listing of all members.'; } elseif ( 'groups' === $name ) { $description = 'This directory shows a listing of all groups.'; } elseif ( 'new_forums_page' === $name ) { $description = 'This directory shows a listing of all forums.'; } elseif ( 'activity' === $name ) { $description = 'This directory shows all sitewide activity.'; } elseif ( 'media' === $name ) { $description = 'This directory shows all photos uploaded by members.'; } add_settings_field( $name, $label, 'bp_admin_setting_callback_page_directory_dropdown', 'bp-pages', 'bp_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.