Example #1
0
/**
 * Topic metabox
 *
 * The metabox that holds all of the additional topic information
 *
 * @since bbPress (r2464)
 *
 * @uses bbp_get_topic_forum_id() To get the topic forum id
 * @uses bbp_dropdown() To show a dropdown of the forums for topic parent
 * @uses do_action() Calls 'bbp_topic_metabox'
 */
function bbp_topic_metabox()
{
    // Post ID
    $post_id = get_the_ID();
    $args = array('selected' => bbp_get_topic_forum_id($post_id), 'select_id' => 'parent_id', 'show_none' => is_super_admin() ? __('(No Forum)', 'bbpress') : '');
    ?>

	<p><strong><?php 
    _e('Forum', 'bbpress');
    ?>
</strong></p>

	<p>
		<label class="screen-reader-text" for="parent_id"><?php 
    _e('Forum', 'bbpress');
    ?>
</label>
		<?php 
    bbp_dropdown($args);
    ?>
	</p>

	<p><strong><?php 
    _e('Topic Type', 'bbpress');
    ?>
</strong></p>

	<p>
		<label class="screen-reader-text" for="bbp_stick_topic"><?php 
    _e('Topic Type', 'bbpress');
    ?>
</label>
		<?php 
    bbp_topic_type_select(array('topic_id' => $post_id));
    ?>
	</p>

	<?php 
    wp_nonce_field('bbp_topic_metabox_save', 'bbp_topic_metabox');
    do_action('bbp_topic_metabox', $post_id);
}
Example #2
0
    if (current_user_can('moderate')) {
        ?>

							<?php 
        do_action('bbp_theme_before_topic_form_type');
        ?>

							<p>

								<label for="bbp_stick_topic"><?php 
        _e('Topic Type:', 'bbpress');
        ?>
</label><br />

								<?php 
        bbp_topic_type_select();
        ?>

							</p>

							<?php 
        do_action('bbp_theme_after_topic_form_type');
        ?>

						<?php 
    }
    ?>

						<?php 
    if (bbp_is_subscriptions_active() && !bbp_is_anonymous() && (!bbp_is_topic_edit() || bbp_is_topic_edit() && !bbp_is_topic_anonymous())) {
        ?>
Example #3
0
/**
 * Topic metabox
 *
 * The metabox that holds all of the additional topic information
 *
 * @since bbPress (r2464)
 *
 * @uses bbp_get_topic_forum_id() To get the topic forum id
 * @uses do_action() Calls 'bbp_topic_metabox'
 */
function bbp_topic_metabox()
{
    // Post ID
    $post_id = get_the_ID();
    ?>

	<p>
		<strong class="label"><?php 
    _e('Type:', 'bbpress');
    ?>
</strong>
		<label class="screen-reader-text" for="bbp_stick_topic"><?php 
    _e('Topic Type', 'bbpress');
    ?>
</label>
		<?php 
    bbp_topic_type_select(array('topic_id' => $post_id));
    ?>
	</p>

	<p>
		<strong class="label"><?php 
    _e('Forum:', 'bbpress');
    ?>
</strong>
		<label class="screen-reader-text" for="parent_id"><?php 
    _e('Forum', 'bbpress');
    ?>
</label>
		<?php 
    bbp_dropdown(array('post_type' => bbp_get_forum_post_type(), 'selected' => bbp_get_topic_forum_id($post_id), 'child_of' => '0', 'numberposts' => -1, 'orderby' => 'title', 'order' => 'ASC', 'walker' => '', 'exclude' => '', 'select_id' => 'parent_id', 'tab' => bbp_get_tab_index(), 'options_only' => false, 'show_none' => __('&mdash; No parent &mdash;', 'bbpress'), 'none_found' => false, 'disable_categories' => current_user_can('edit_forums'), 'disabled' => ''));
    ?>
	</p>

	<?php 
    wp_nonce_field('bbp_topic_metabox_save', 'bbp_topic_metabox');
    do_action('bbp_topic_metabox', $post_id);
}