bbp_forum_metabox()
Forum metabox
Description
The metabox that holds all of the additional forum information
Source
File: bp-forums/admin/metaboxes.php
function bbp_forum_metabox() { // Post ID $post_id = get_the_ID(); $post_parent = bbp_get_global_post_field( 'post_parent', 'raw' ); $menu_order = bbp_get_global_post_field( 'menu_order', 'edit' ); /** Type ******************************************************************/ ?> <p> <strong class="label"><?php esc_html_e( 'Type:', 'buddyboss' ); ?></strong> <label class="screen-reader-text" for="bbp_forum_type_select"><?php esc_html_e( 'Type:', 'buddyboss' ) ?></label> <?php bbp_form_forum_type_dropdown( array( 'forum_id' => $post_id ) ); ?> </p> <?php /** Status ****************************************************************/ ?> <p> <strong class="label"><?php esc_html_e( 'Status:', 'buddyboss' ); ?></strong> <label class="screen-reader-text" for="bbp_forum_status_select"><?php esc_html_e( 'Status:', 'buddyboss' ) ?></label> <?php bbp_form_forum_status_dropdown( array( 'forum_id' => $post_id ) ); ?> </p> <?php /** Visibility ************************************************************/ ?> <p> <strong class="label"><?php esc_html_e( 'Visibility:', 'buddyboss' ); ?></strong> <label class="screen-reader-text" for="bbp_forum_visibility_select"><?php esc_html_e( 'Visibility:', 'buddyboss' ) ?></label> <?php bbp_form_forum_visibility_dropdown( array( 'forum_id' => $post_id ) ); ?> </p> <hr /> <?php /** Parent ****************************************************************/ ?> <p> <strong class="label"><?php esc_html_e( 'Parent:', 'buddyboss' ); ?></strong> <label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Forum Parent', 'buddyboss' ); ?></label> <?php bbp_dropdown( array( 'post_type' => bbp_get_forum_post_type(), 'selected' => $post_parent, 'numberposts' => -1, 'orderby' => 'title', 'order' => 'ASC', 'walker' => '', 'exclude' => $post_id, // Output-related 'select_id' => 'parent_id', 'tab' => bbp_get_tab_index(), 'options_only' => false, 'show_none' => __( '- Select Forum -', 'buddyboss' ), 'disable_categories' => false, 'disabled' => '' ) ); ?> </p> <p> <strong class="label"><?php esc_html_e( 'Order:', 'buddyboss' ); ?></strong> <label class="screen-reader-text" for="menu_order"><?php esc_html_e( 'Forum Order', 'buddyboss' ); ?></label> <input name="menu_order" type="number" step="1" size="4" id="menu_order" value="<?php echo esc_attr( $menu_order ); ?>" /> </p> <input name="ping_status" type="hidden" id="ping_status" value="open" /> <?php wp_nonce_field( 'bbp_forum_metabox_save', 'bbp_forum_metabox' ); do_action( 'bbp_forum_metabox', $post_id ); }
Changelog
Version | Description |
---|---|
bbPress (r2744) | 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.