本文整理汇总了PHP中bbp_dropdown函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_dropdown函数的具体用法?PHP bbp_dropdown怎么用?PHP bbp_dropdown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bbp_dropdown函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: bbps_add_support_forum_features
function bbps_add_support_forum_features()
{
//only display all this stuff if the support forum option has been selected.
if (bbps_is_support_forum(bbp_get_forum_id())) {
$can_edit = bbps_get_update_capabilities();
if ($can_edit) {
$topic_id = bbp_get_topic_id();
$status = bbps_get_topic_status($topic_id);
$forum_id = bbp_get_forum_id();
$user_id = get_current_user_id();
?>
<div class="row">
<div class="col-md-6">
<div id="bbps_support_forum_options" class="well"> <?php
//get out the option to tell us who is allowed to view and update the drop down list.
if ($can_edit == true) {
?>
<?php
bbps_generate_status_options($topic_id, $status);
} else {
?>
This topic is: <?php
echo $status;
}
?>
</div> <?php
//has the user enabled the move topic feature?
if (get_option('_bbps_enable_topic_move') == 1 && (current_user_can('administrator') || current_user_can('bbp_moderator'))) {
?>
<div id="bbps_support_forum_move" class="span6 well">
<form id="bbps-topic-move" name="bbps_support_topic_move" action="" method="post">
<label for="bbp_forum_id">Move topic to: </label><?php
bbp_dropdown();
?>
<input type="submit" value="Move" name="bbps_topic_move_submit" />
<input type="hidden" value="bbps_move_topic" name="bbps_action"/>
<input type="hidden" value="<?php
echo $topic_id;
?>
" name="bbps_topic_id" />
<input type="hidden" value="<?php
echo $forum_id;
?>
" name="bbp_old_forum_id" />
</form>
</div>
<?php
}
?>
</div> </div> <!-- row --><?php
}
}
}
开发者ID:styledthemes,项目名称:bbPress-Support-Forums,代码行数:53,代码来源:bbps-support-functions.php
示例2: do_action
<?php
do_action('bbp_theme_after_forum_visibility_status');
?>
<?php
do_action('bbp_theme_before_forum_form_parent');
?>
<p>
<label for="bbp_forum_parent_id"><?php
_e('Parent Forum:', 'bbpress');
?>
</label><br />
<?php
bbp_dropdown(array('select_id' => 'bbp_forum_parent_id', 'show_none' => __('(No Parent)', 'bbpress'), 'selected' => bbp_get_form_forum_parent(), 'exclude' => bbp_get_forum_id()));
?>
</p>
<?php
do_action('bbp_theme_after_forum_form_parent');
?>
<?php
do_action('bbp_theme_before_forum_form_submit_wrapper');
?>
<div class="bbp-submit-wrapper">
<?php
do_action('bbp_theme_before_forum_form_submit_button');
开发者ID:severnrescue,项目名称:web,代码行数:31,代码来源:form-forum.php
示例3: do_action
<?php
if (!bbp_is_single_forum()) {
?>
<?php
do_action('bbp_theme_before_topic_form_forum');
?>
<p>
<label for="bbp_forum_id"><?php
esc_html_e('Forum:', 'monsoon');
?>
</label><br />
<?php
bbp_dropdown(array('show_none' => esc_html__('(No Forum)', 'monsoon'), 'selected' => bbp_get_form_topic_forum()));
?>
</p>
<?php
do_action('bbp_theme_after_topic_form_forum');
?>
<?php
}
?>
<?php
if (current_user_can('moderate')) {
?>
开发者ID:estrategasdigitales,项目名称:flazam,代码行数:29,代码来源:form-topic.php
示例4: bbp_reply_metabox
/**
* Reply metabox
*
* The metabox that holds all of the additional reply information
*
* @since 2.0.0 bbPress (r2464)
*
* @uses bbp_get_topic_post_type() To get the topic post type
* @uses do_action() Calls 'bbp_reply_metabox'
*/
function bbp_reply_metabox()
{
// Post ID
$post_id = get_the_ID();
$status = get_post_status($post_id);
// Get some meta
$reply_topic_id = bbp_get_reply_topic_id($post_id);
$reply_forum_id = bbp_get_reply_forum_id($post_id);
$topic_forum_id = bbp_get_topic_forum_id($reply_topic_id);
/** 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="post_status"><?php
esc_html_e('Select what status to give the reply.', 'bbpress');
?>
</label>
<?php
bbp_form_reply_status_dropdown(array('select_id' => 'post_status', 'reply_id' => $post_id));
?>
</p>
<hr />
<?php
/** Forum *****************************************************************/
// Only allow individual manipulation of reply forum if there is a mismatch
if ($reply_forum_id !== $topic_forum_id && (current_user_can('edit_others_replies') || current_user_can('moderate'))) {
?>
<p>
<strong class="label"><?php
esc_html_e('Forum:', 'bbpress');
?>
</strong>
<label class="screen-reader-text" for="bbp_forum_id"><?php
esc_html_e('Forum', 'bbpress');
?>
</label>
<?php
bbp_dropdown(array('post_type' => bbp_get_forum_post_type(), 'selected' => $reply_forum_id, 'numberposts' => -1, 'orderby' => 'title', 'order' => 'ASC', 'walker' => '', 'exclude' => '', 'select_id' => 'bbp_forum_id', 'options_only' => false, 'show_none' => __('— No reply —', 'bbpress'), 'disable_categories' => current_user_can('edit_forums'), 'disabled' => ''));
?>
</p>
<?php
}
/** Topic *****************************************************************/
?>
<p>
<strong class="label"><?php
esc_html_e('Topic:', 'bbpress');
?>
</strong>
<label class="screen-reader-text" for="parent_id"><?php
esc_html_e('Topic', 'bbpress');
?>
</label>
<input name="parent_id" id="bbp_topic_id" type="text" value="<?php
echo esc_attr($reply_topic_id);
?>
" data-ajax-url="<?php
echo esc_url(wp_nonce_url(add_query_arg(array('action' => 'bbp_suggest_topic'), admin_url('admin-ajax.php', 'relative')), 'bbp_suggest_topic_nonce'));
?>
" />
</p>
<?php
/** Reply To **************************************************************/
?>
<p>
<strong class="label"><?php
esc_html_e('Reply To:', 'bbpress');
?>
</strong>
<label class="screen-reader-text" for="bbp_reply_to"><?php
esc_html_e('Reply To', 'bbpress');
?>
</label>
<?php
bbp_reply_to_dropdown($post_id);
//.........这里部分代码省略.........
开发者ID:joeyblake,项目名称:bbpress,代码行数:101,代码来源:metaboxes.php
示例5: do_action
<?php
if (!bbp_is_single_forum()) {
?>
<?php
do_action('bbp_theme_before_topic_form_forum');
?>
<p>
<label for="bbp_forum_id"><?php
_e('Forum:', 'bbpress');
?>
</label><br />
<?php
bbp_dropdown(array('show_none' => __('(No Forum)', 'bbpress'), 'selected' => bbp_get_form_topic_forum()));
?>
</p>
<?php
do_action('bbp_theme_after_topic_form_forum');
?>
<?php
}
?>
<?php
if (current_user_can('moderate')) {
?>
开发者ID:severnrescue,项目名称:web,代码行数:29,代码来源:form-topic.php
示例6: do_action
<?php
do_action('bbp_theme_after_forum_visibility_status');
?>
<?php
do_action('bbp_theme_before_forum_form_parent');
?>
<p>
<label for="bbp_forum_parent_id"><?php
esc_html_e('Parent Forum:', 'bbpress');
?>
</label><br />
<?php
bbp_dropdown(array('select_id' => 'bbp_forum_parent_id', 'show_none' => esc_html__('— No parent —', 'bbpress'), 'selected' => bbp_get_form_forum_parent(), 'exclude' => bbp_get_forum_id()));
?>
</p>
<?php
do_action('bbp_theme_after_forum_form_parent');
?>
<?php
do_action('bbp_theme_before_forum_form_submit_wrapper');
?>
<div class="bbp-submit-wrapper">
<?php
do_action('bbp_theme_before_forum_form_submit_button');
开发者ID:CompositeUK,项目名称:clone.bbPress,代码行数:31,代码来源:form-forum.php
示例7: bbp_reply_metabox
/**
* Reply metabox
*
* The metabox that holds all of the additional reply information
*
* @since bbPress (r2464)
*
* @uses bbp_get_topic_post_type() To get the topic post type
* @uses bbp_dropdown() To show a dropdown of the topics for reply parent
* @uses do_action() Calls 'bbp_reply_metabox'
*/
function bbp_reply_metabox()
{
// Post ID
$post_id = get_the_ID();
// Get some meta
$reply_topic_id = bbp_get_reply_topic_id($post_id);
$reply_forum_id = bbp_get_reply_forum_id($post_id);
// Allow individual manipulation of reply forum
if (current_user_can('edit_others_replies') || current_user_can('moderate')) {
// Forums
$args = array('selected' => $reply_forum_id, 'select_id' => 'bbp_forum_id', 'show_none' => __('(Use Forum of Topic)', 'bbpress'));
?>
<p><strong><?php
_e('Forum', 'bbpress');
?>
</strong></p>
<p>
<label class="screen-reader-text" for="bbp_forum_id"><?php
_e('Forum', 'bbpress');
?>
</label>
<?php
bbp_dropdown($args);
?>
</p>
<?php
}
// Topics
$args = array('post_type' => bbp_get_topic_post_type(), 'selected' => $reply_topic_id, 'select_id' => 'parent_id', 'orderby' => 'post_date', 'numberposts' => '250', 'show_none' => is_super_admin() ? __('(No Topic)', 'bbpress') : '');
// Allow the dropdown to be filtered, to extend or limit the available
// topics to choose as the reply parent.
$args = apply_filters('bbp_reply_parent_dropdown', $args);
?>
<p><strong><?php
_e('Topic', 'bbpress');
?>
</strong></p>
<p>
<label class="screen-reader-text" for="parent_id"><?php
_e('Topic', 'bbpress');
?>
</label>
<?php
bbp_dropdown($args);
?>
</p>
<?php
wp_nonce_field('bbp_reply_metabox_save', 'bbp_reply_metabox');
do_action('bbp_reply_metabox', $post_id);
}
开发者ID:rmccue,项目名称:bbPress,代码行数:71,代码来源:bbp-metaboxes.php
示例8: filter_dropdown
/**
* Add forum dropdown to topic and reply list table filters
*
* @since 2.0.0 bbPress (r2991)
*
* @uses bbp_get_reply_post_type() To get the reply post type
* @uses bbp_get_topic_post_type() To get the topic post type
* @uses bbp_dropdown() To generate a forum dropdown
* @return bool False. If post type is not topic or reply
*/
public function filter_dropdown()
{
if ($this->bail()) {
return;
}
// Add Empty Spam button
if (!empty($_GET['post_status']) && bbp_get_spam_status_id() === $_GET['post_status'] && current_user_can('moderate')) {
wp_nonce_field('bulk-destroy', '_destroy_nonce');
$title = esc_attr__('Empty Spam', 'bbpress');
submit_button($title, 'button-secondary apply', 'delete_all', false);
}
// Get which forum is selected
$selected = !empty($_GET['bbp_forum_id']) ? $_GET['bbp_forum_id'] : '';
// Show the forums dropdown
bbp_dropdown(array('selected' => $selected, 'show_none' => __('In all forums', 'bbpress')));
}
开发者ID:joeyblake,项目名称:bbpress,代码行数:26,代码来源:replies.php
示例9: esc_html_e
<legend><?php
esc_html_e('Destination', 'bbpress');
?>
</legend>
<div>
<?php
if (bbp_has_topics(array('show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id(bbp_get_topic_id()), 'post__not_in' => array(bbp_get_topic_id())))) {
?>
<label for="bbp_destination_topic"><?php
esc_html_e('Merge with this topic:', 'bbpress');
?>
</label>
<?php
bbp_dropdown(array('post_type' => bbp_get_topic_post_type(), 'post_parent' => bbp_get_topic_forum_id(bbp_get_topic_id()), 'post_status' => array(bbp_get_public_status_id(), bbp_get_closed_status_id()), 'selected' => -1, 'exclude' => bbp_get_topic_id(), 'select_id' => 'bbp_destination_topic'));
?>
<?php
} else {
?>
<label><?php
esc_html_e('There are no other topics in this forum to merge with.', 'bbpress');
?>
</label>
<?php
}
?>
开发者ID:joeyblake,项目名称:bbpress,代码行数:30,代码来源:form-topic-merge.php
示例10: bbp_admin_setting_callback_group_forums_root_id
/**
* Replies per page setting field
*
* @since 2.1.0 bbPress (r3575)
*
* @uses bbp_form_option() To output the option value
*/
function bbp_admin_setting_callback_group_forums_root_id()
{
// Output the dropdown for all forums
bbp_dropdown(array('selected' => bbp_get_group_forums_root_id(), 'show_none' => __('— Forum root —', 'bbpress'), 'orderby' => 'title', 'order' => 'ASC', 'select_id' => '_bbp_group_forums_root_id', 'disable_categories' => false, 'disabled' => '_bbp_group_forums_root_id'));
?>
<?php
esc_html_e('is the parent for all group forums', 'bbpress');
?>
<p class="description"><?php
esc_html_e('Using the Forum Root is not recommended. Changing this does not move existing forums.', 'bbpress');
?>
</p>
<?php
}
开发者ID:joeyblake,项目名称:bbpress,代码行数:23,代码来源:settings.php
示例11: bbp_admin_setting_callback_group_forums_root_id
/**
* Replies per page setting field
*
* @since bbPress (r3575)
*
* @uses bbp_form_option() To output the option value
*/
function bbp_admin_setting_callback_group_forums_root_id()
{
?>
<?php
bbp_dropdown(array('selected' => bbp_get_group_forums_root_id(), 'show_none' => __('(Forum Root)', 'bbpress'), 'select_id' => '_bbp_group_forums_root_id', 'disable_categories' => false));
?>
<label for="_bbp_group_forums_root_id"><?php
_e('is the parent for all group forums', 'bbpress');
?>
</label>
<p class="description"><?php
_e('Using the Forum Root is not recommended. Changing this does not move existing forums.', 'bbpress');
?>
</p>
<?php
}
开发者ID:rmccue,项目名称:bbPress,代码行数:26,代码来源:bbp-settings.php
示例12: bbp_dropdown
</div>
</fieldset>
<?php
// Topics options
?>
<fieldset id="adv-search-topics" class="adv-search-fields <?php
if ($context == 'topics') {
echo 'active';
}
?>
">
<div class="form-left">
<label for="inforum"><i class="fa fa-list fa-fw"></i>In Forum: </label>
<?php
bbp_dropdown($args = array('post_type' => 'forum', 'show_none' => 'Any Forum', 'selected' => isset($search->forum) ? $search->forum : NULL, 'select_id' => 'inforum'));
?>
</div>
</fieldset>
<?php
// Members and Groups options
?>
<fieldset id="adv-search-members" class="adv-search-fields <?php
if ($context == 'members' || $context == 'groups') {
echo 'active';
}
?>
">
<div class="form-left">
<label for="faction"><i class="fa fa-flag fa-fw"></i>In Alliance: </label>
开发者ID:tamriel-foundry,项目名称:apoc2,代码行数:31,代码来源:archive-search.php
示例13: do_action
<?php
if (!bbp_is_single_forum()) {
?>
<?php
do_action('bbp_theme_before_topic_form_forum');
?>
<p>
<label for="bbp_forum_id"><?php
_e('Forum:', 'bbpress');
?>
</label><br />
<?php
bbp_dropdown(array('selected' => bbp_get_form_topic_forum()));
?>
</p>
<?php
do_action('bbp_theme_after_topic_form_forum');
?>
<?php
}
?>
<?php
if (current_user_can('moderate')) {
?>
开发者ID:besimhu,项目名称:legacy,代码行数:29,代码来源:form-topic.php
示例14: bbp_reply_metabox
/**
* Reply metabox
*
* The metabox that holds all of the additional reply information
*
* @since bbPress (r2464)
*
* @uses bbp_get_topic_post_type() To get the topic post type
* @uses do_action() Calls 'bbp_reply_metabox'
*/
function bbp_reply_metabox()
{
// Post ID
$post_id = get_the_ID();
// Get some meta
$reply_topic_id = bbp_get_reply_topic_id($post_id);
$reply_forum_id = bbp_get_reply_forum_id($post_id);
$reply_to = bbp_get_reply_to($post_id);
// Allow individual manipulation of reply forum
if (current_user_can('edit_others_replies') || current_user_can('moderate')) {
?>
<p>
<strong class="label"><?php
esc_html_e('Forum:', 'bbpress');
?>
</strong>
<label class="screen-reader-text" for="bbp_forum_id"><?php
esc_html_e('Forum', 'bbpress');
?>
</label>
<?php
bbp_dropdown(array('post_type' => bbp_get_forum_post_type(), 'selected' => $reply_forum_id, 'numberposts' => -1, 'orderby' => 'title', 'order' => 'ASC', 'walker' => '', 'exclude' => '', 'select_id' => 'bbp_forum_id', 'tab' => bbp_get_tab_index(), 'options_only' => false, 'show_none' => __('— No parent —', 'bbpress'), 'disable_categories' => current_user_can('edit_forums'), 'disabled' => ''));
?>
</p>
<?php
}
?>
<p>
<strong class="label"><?php
esc_html_e('Topic:', 'bbpress');
?>
</strong>
<label class="screen-reader-text" for="parent_id"><?php
esc_html_e('Topic', 'bbpress');
?>
</label>
<input name="parent_id" id="bbp_topic_id" type="text" value="<?php
echo esc_attr($reply_topic_id);
?>
" />
</p>
<p>
<strong class="label"><?php
esc_html_e('Reply To:', 'bbpress');
?>
</strong>
<label class="screen-reader-text" for="bbp_reply_to"><?php
esc_html_e('Reply To', 'bbpress');
?>
</label>
<input name="bbp_reply_to" id="bbp_reply_to" type="text" value="<?php
echo esc_attr($reply_to);
?>
" />
</p>
<input name="ping_status" type="hidden" id="ping_status" value="open" />
<?php
wp_nonce_field('bbp_reply_metabox_save', 'bbp_reply_metabox');
do_action('bbp_reply_metabox', $post_id);
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:76,代码来源:metaboxes.php
示例15: bbp_tab_index
<?php
if (bbp_has_topics(array('show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id(bbp_get_topic_id()), 'post__not_in' => array(bbp_get_topic_id())))) {
?>
<div>
<input name="bbp_topic_split_option" id="bbp_topic_split_option_existing" type="radio" value="existing" tabindex="<?php
bbp_tab_index();
?>
" />
<label for="bbp_topic_split_option_existing"><?php
_e('Use an existing topic in this forum:', 'bbpress');
?>
</label>
<?php
bbp_dropdown(array('post_type' => bbp_get_topic_post_type(), 'post_parent' => bbp_get_topic_forum_id(bbp_get_topic_id()), 'selected' => -1, 'exclude' => bbp_get_topic_id(), 'select_id' => 'bbp_destination_topic', 'none_found' => __('No other topics found!', 'bbpress')));
?>
</div>
<?php
}
?>
</fieldset>
<fieldset class="bbp-form">
<legend><?php
_e('Topic Extras', 'bbpress');
?>
</legend>
开发者ID:JMulligan,项目名称:skeleton_wp,代码行数:31,代码来源:form-topic-split.php
示例16: topic_parent
public function topic_parent()
{
$forum_ids = bbp_get_group_forum_ids(bp_get_current_group_id());
?>
<p>
<label for="bbp_forum_id"><?php
esc_html_e('Forum:', 'bbpress');
?>
</label><br />
<?php
bbp_dropdown(array('include' => $forum_ids, 'selected' => bbp_get_form_topic_forum()));
?>
</p>
<?php
}
开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:17,代码来源:groups.php
示例17: _e
?>
</p>
</div>
<h4><?php
_e('Destination', 'bbpress');
?>
</h4>
<?php
if (bbp_has_topics(array('show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id(bbp_get_topic_id()), 'post__not_in' => array(bbp_get_topic_id())))) {
?>
<label for="bbp_destination_topic"><?php
_e('Merge with this topic:', 'bbpress');
?>
</label>
<?php
bbp_dropdown(array('post_type' => bbp_get_topic_post_type(), 'post_parent' => bbp_get_topic_forum_id(bbp_get_topic_id()), 'selected' => -1, 'exclude' => bbp_get_topic_id(), 'select_id' => 'bbp_destination_topic', 'none_found' => __('No topics were found to which the topic could be merged to!', 'bbpress')));
?>
<?php
} else {
?>
<p class="alert alert-danger"><?php
_e('There are no other topics in this forum to merge with.', 'bbpress');
?>
</p>
<?php
}
?>
<h4><?php
_e('Topic Extras', 'bbpress');
?>
开发者ID:andychoi,项目名称:k-knowledgebase-theme-wp,代码行数:31,代码来源:form-topic-merge.php
示例18: bbp_tab_index
<?php
if (bbp_has_topics(array('show_stickies' => false, 'post_parent' => bbp_get_reply_forum_id(bbp_get_reply_id()), 'post__not_in' => array(bbp_get_reply_topic_id(bbp_get_reply_id()))))) {
?>
<div>
<input name="bbp_reply_move_option" id="bbp_reply_move_option_existing" type="radio" value="existing" tabindex="<?php
bbp_tab_index();
?>
" />
<label for="bbp_reply_move_option_existing"><?php
_e('Use an existing topic in this forum:', 'bbpress');
?>
</label>
<?php
bbp_dropdown(array('post_type' => bbp_get_topic_post_type(), 'post_parent' => bbp_get_reply_forum_id(bbp_get_reply_id()), 'selected' => -1, 'exclude' => bbp_get_reply_topic_id(bbp_get_reply_id()), 'select_id' => 'bbp_destination_topic'));
?>
</div>
<?php
}
?>
</fieldset>
<div class="bbp-template-notice error">
<p><?php
_e('<strong>WARNING:</strong> This process cannot be undone.', 'bbpress');
?>
</p>
开发者ID:vinodhip,项目名称:Function-22-Website,代码行数:31,代码来源:form-reply-move.php
示例19: display_topic_option
/**
* Add the bbPress topic option to the Discussion meta box
*/
function display_topic_option($post)
{
/** Store the post being edited and restore it after looping over forums */
global $post;
$the_post = $post;
if (!function_exists('bbp_has_forums')) {
?>
<br /><p><?php
_e('bbPress Topics for Posts has been enabled, but cannot detect your bbPress setup.', 'bbpress-post-topics');
?>
</p><?php
return;
}
$bbpress_topic_options = $this->get_topic_options_for_post($post->ID);
$bbpress_topic_status = $bbpress_topic_options['enabled'] != false;
$bbpress_topic_display = $bbpress_topic_options['display'];
$bbpress_topic_slug = $bbpress_topic_options['topic_id'];
if ($bbpress_topic_slug) {
$bbpress_topic = bbp_get_topic($bbpress_topic_slug);
$bbpress_topic_slug = $bbpress_topic->post_name;
/** If a topic already exists, don't select default forum */
$bbpress_topic_options['forum_id'] = 0;
}
$forums = bbp_has_forums();
if (!$forums) {
?>
<br /><p><?php
_e('bbPress Topics for Posts has been enabled, but you have not created any forums yet.', 'bbpress-post-topics');
?>
</p><?php
return;
}
?>
<br />
<input type="hidden" name="bbpress_topic[form_displayed]" value="true" />
<label for="bbpress_topic_status" class="selectit"><input name="bbpress_topic[enabled]" type="checkbox" id="bbpress_topic_status" value="open" <?php
checked($bbpress_topic_status);
?>
/> <?php
_e('Use a bbPress forum topic for comments on this post.', 'bbpress-post-topics');
?>
</label><br />
<div id="bbpress_topic_status_options" class="inside" style="display: <?php
echo checked($bbpress_topic_status, true, false) ? 'block' : 'none';
?>
;">
<h4>bbPress Topic Options</h4>
<label for="bbpress_topic_slug"><?php
_e('Use an existing topic:', 'bbpress-post-topics');
?>
</label> <input type="text" name="bbpress_topic[slug]" id="bbpress_topic_slug" placeholder="<?php
_e('Topic ID or slug', 'bbpress-post-topics');
?>
" value="<?php
echo $bbpress_topic_slug;
?>
" <?php
if ($bbpress_topic_options['forum_id']) {
echo ' disabled="true"';
}
?>
/>
- OR - <label for="bbpress_topic_forum"><?php
_e('Create a new topic in forum:', 'bbpress-post-topics');
?>
</label>
<select name="bbpress_topic[forum_id]" id="bbpress_topic_forum">
<option value="0" selected><?php
_e('Select a Forum', 'bbpress-post-topics');
?>
</option>
<?php
$forum_dropdown_options = array('selected' => $bbpress_topic_options['forum_id'], 'options_only' => true);
bbp_dropdown($forum_dropdown_options);
?>
</select><br />
— <input type="checkbox" name="bbpress_topic[copy_tags]" id="bbpress_topic_copy_tags" <?php
checked($bbpress_topic_options['copy_tags'], 'on');
?>
/> <label for="bbpress_topic_copy_tags"><?php
_e('Copy post tags to new topic', 'bbpress-post-topics');
?>
</label>
<?php
if ($import_date = get_post_meta($post->ID, 'bbpress_discussion_tags_copied', true)) {
printf('( ' . __('last copied %s ago', 'bbpress-post-topics') . ' )', human_time_diff($import_date));
}
?>
<br />
<?php
if (wp_count_comments($post->ID)->total_comments > 0) {
?>
— <input type="checkbox" name="bbpress_topic[copy_comments]" id="bbpress_topic_copy_comments" <?php
checked($bbpress_topic_options['copy_comments'], 'on');
?>
//.........这里部分代码省略.........
开发者ID:benklocek,项目名称:bbPress-Topics-for-Posts,代码行数:101,代码来源:index.php
注:本文中的bbp_dropdown函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论