当前位置: 首页>>代码示例>>PHP>>正文


PHP bbp_form_topic_status_dropdown函数代码示例

本文整理汇总了PHP中bbp_form_topic_status_dropdown函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_form_topic_status_dropdown函数的具体用法?PHP bbp_form_topic_status_dropdown怎么用?PHP bbp_form_topic_status_dropdown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bbp_form_topic_status_dropdown函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: do_action

        do_action('bbp_theme_after_topic_form_type');
        ?>

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

						<p>

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

							<?php 
        bbp_form_topic_status_dropdown();
        ?>

						</p>

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

					<?php 
    }
    ?>

					<?php 
    if (bbp_is_subscriptions_active() && !bbp_is_anonymous() && (!bbp_is_topic_edit() || bbp_is_topic_edit() && !bbp_is_topic_anonymous())) {
        ?>
开发者ID:severnrescue,项目名称:web,代码行数:31,代码来源:form-topic.php

示例2: bbp_topic_metabox

/**
 * Topic metabox
 *
 * The metabox that holds all of the additional topic information
 *
 * @since 2.0.0 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();
    $status = get_post_status($post_id);
    /** 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' === $status ? 'draft' : $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' => '', 'select_id' => 'parent_id', 'options_only' => false, 'show_none' => __('&mdash; No parent &mdash;', '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_id);
}
开发者ID:joeyblake,项目名称:bbpress,代码行数:80,代码来源:metaboxes.php


注:本文中的bbp_form_topic_status_dropdown函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。