bbp_topic_metabox( $post )
Topic meta-box
Description Description
The meta-box that holds all of the additional topic information
Source Source
File: includes/admin/metaboxes.php
function bbp_topic_metabox( $post ) {
/** Type ******************************************************************/
?>
<p>
<strong class="label"><?php esc_html_e( 'Type:', 'bbpress' ); ?></strong>
<label class="screen-reader-text" for="bbp_stick_topic"><?php esc_html_e( 'Topic Type', 'bbpress' ); ?></label>
<?php bbp_form_topic_type_dropdown( array( 'topic_id' => $post->ID ) ); ?>
</p>
<?php
/** Status ****************************************************************/
?>
<p>
<strong class="label"><?php esc_html_e( 'Status:', 'bbpress' ); ?></strong>
<input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ( 'auto-draft' === $post->post_status ) ? 'draft' : $post->post_status ); ?>" />
<label class="screen-reader-text" for="bbp_open_close_topic"><?php esc_html_e( 'Select whether to open or close the topic.', 'bbpress' ); ?></label>
<?php bbp_form_topic_status_dropdown( array( 'select_id' => 'post_status', 'topic_id' => $post->ID ) ); ?>
</p>
<?php
/** Parent *****************************************************************/
?>
<hr />
<p>
<strong class="label"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></strong>
<label class="screen-reader-text" for="parent_id"><?php esc_html_e( 'Forum', 'bbpress' ); ?></label>
<?php bbp_dropdown( array(
'post_type' => bbp_get_forum_post_type(),
'selected' => bbp_get_topic_forum_id( $post->ID ),
'numberposts' => -1,
'orderby' => 'title',
'order' => 'ASC',
'walker' => '',
'exclude' => '',
// Output-related
'select_id' => 'parent_id',
'options_only' => false,
'show_none' => esc_html__( '— No forum —', 'bbpress' ),
'disable_categories' => current_user_can( 'edit_forums' ),
'disabled' => ''
) ); ?>
</p>
<input name="ping_status" type="hidden" id="ping_status" value="open" />
<?php
wp_nonce_field( 'bbp_topic_metabox_save', 'bbp_topic_metabox' );
do_action( 'bbp_topic_metabox', $post );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |