bbp_admin_setting_callback_show_on_root()
Include root slug setting field
Description
Source
File: bp-forums/admin/settings.php
function bbp_admin_setting_callback_show_on_root() {
// Current setting
$show_on_root = bbp_show_on_root();
// Options for forum root output
$root_options = array(
'forums' => array(
'name' => __( 'Forum Index', 'buddyboss' )
),
'topics' => array(
'name' => __( 'Discussions by Last Post', 'buddyboss' )
)
); ?>
<select name="_bbp_show_on_root" id="_bbp_show_on_root" <?php bbp_maybe_admin_setting_disabled( '_bbp_show_on_root' ); ?>>
<?php foreach ( $root_options as $option_id => $details ) : ?>
<option <?php selected( $show_on_root, $option_id ); ?> value="<?php echo esc_attr( $option_id ); ?>"><?php echo esc_html( $details['name'] ); ?></option>
<?php endforeach; ?>
</select>
<?php
}
Changelog
| Version | Description |
|---|---|
| bbPress (r2786) | 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.