bp_core_compatibility_do_settings_sections( string $page )
Prints out all settings sections added to a particular settings page
Description
Part of the Settings API. Use this in a settings page callback function to output all the sections and fields that were added to that $page with add_settings_section() and add_settings_field()
Parameters
- $page
-
(Required) The slug name of the page whose settings sections you want to output.
Source
File: bp-integrations/compatibility/bp-compatibility-loader.php
function bp_core_compatibility_do_settings_sections( $page ) { global $wp_settings_sections, $wp_settings_fields; if ( ! isset( $wp_settings_sections[ $page ] ) ) { return; } foreach ( (array) $wp_settings_sections[ $page ] as $section ) { if ( isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ) { if ( $section['title'] ) { echo "<h3>{$section['title']}</h3>\n"; } if ( $section['callback'] ) { call_user_func( $section['callback'], $section ); } if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ) { continue; } echo '<table class="form-table">'; do_settings_fields( $page, $section['id'] ); echo '</table>'; } } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.1.6 | 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.