<label for="mb_topic_forum"><?php 
_e('Select a forum:', 'message-board');
?>
</label>
			<?php 
mb_dropdown_forums(array('child_type' => mb_get_topic_post_type(), 'name' => 'mb_topic_forum', 'id' => 'mb_topic_forum', 'selected' => mb_get_topic_forum_id()));
?>
		</p>

		<p>
			<label for="mb_topic_content"><?php 
_e('Please put code in between <code>`backtick`</code> characters.', 'message-board');
?>
</label>
			<textarea id="mb_topic_content" name="mb_topic_content"><?php 
echo format_to_edit(mb_code_trick_reverse(mb_get_topic_content(mb_get_topic_id(), 'raw')));
?>
</textarea>
		</p>

		<p>
			<input type="submit" value="<?php 
esc_attr_e('Submit', 'message-board');
?>
" />
		</p>

		<p>
			<label>
				<input type="checkbox" name="mb_topic_subscribe" value="<?php 
echo mb_is_user_subscribed_topic(mb_get_topic_author_id(), mb_get_topic_id()) ? 1 : 0;
Exemplo n.º 2
0
/**
 * Topic content editor.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function mb_topic_editor()
{
    add_action('wp_enqueue_editor', 'mb_dequeue_editor_scripts');
    add_filter('the_editor', 'mb_topic_the_editor_filter');
    wp_editor(format_to_edit(mb_code_trick_reverse(mb_get_topic_content(mb_get_topic_id(), 'raw'))), 'mb_topic_content', array('tinymce' => false, 'media_buttons' => false, 'editor_height' => 250));
}