bbp_forum_metabox( $post )
Forum meta-box
Description Description
The meta-box that holds all of the additional forum information
Source Source
File: includes/admin/metaboxes.php
function bbp_forum_metabox( $post ) {
// Post 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:', 'bbpress' ); ?></strong>
<label class="screen-reader-text" for="bbp_forum_type_select"><?php esc_html_e( 'Type:', 'bbpress' ) ?></label>
<?php bbp_form_forum_type_dropdown( array( 'forum_id' => $post->ID ) ); ?>
</p>
<?php
/** Status ****************************************************************/
?>
<p>
<strong class="label"><?php esc_html_e( 'Status:', 'bbpress' ); ?></strong>
<label class="screen-reader-text" for="bbp_forum_status_select"><?php esc_html_e( 'Status:', 'bbpress' ) ?></label>
<?php bbp_form_forum_status_dropdown( array( 'forum_id' => $post->ID ) ); ?>
</p>
<?php
/** Visibility ************************************************************/
?>
<p>
<strong class="label"><?php esc_html_e( 'Visibility:', 'bbpress' ); ?></strong>
<label class="screen-reader-text" for="bbp_forum_visibility_select"><?php esc_html_e( 'Visibility:', 'bbpress' ) ?></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:', 'bbpress' ); ?></strong>
<label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Forum Parent', 'bbpress' ); ?></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',
'options_only' => false,
'show_none' => esc_html__( '— No parent —', 'bbpress' ),
'disable_categories' => false,
'disabled' => ''
) ); ?>
</p>
<p>
<strong class="label"><?php esc_html_e( 'Order:', 'bbpress' ); ?></strong>
<label class="screen-reader-text" for="menu_order"><?php esc_html_e( 'Forum Order', 'bbpress' ); ?></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 );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |