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


PHP bbp_allow_topic_tags函数代码示例

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


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

示例1: esc_html_e

							<label><?php 
        esc_html_e('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'monsoon');
        ?>
</label><br />
							<code><?php 
        bbp_allowed_tags();
        ?>
</code>
						</p>

					<?php 
    }
    ?>
					
					<?php 
    if (bbp_allow_topic_tags() && current_user_can('assign_topic_tags')) {
        ?>

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

						<p>
							<label for="bbp_topic_tags"><?php 
        esc_html_e('Tags:', 'monsoon');
        ?>
</label><br />
							<input type="text" value="<?php 
        bbp_form_topic_tags();
        ?>
" tabindex="<?php 
开发者ID:estrategasdigitales,项目名称:flazam,代码行数:31,代码来源:form-reply.php

示例2: bbp_get_topic_tag_list

/**
 * Return the tags of a topic
 *
 * @since 2.0.0 bbPress (r2688)
 *
 * @param int $topic_id Optional. Topic id
 * @param array $args This function supports these arguments:
 *  - before: Before the tag list
 *  - sep: Tag separator
 *  - after: After the tag list
 * @uses bbp_get_topic_id() To get the topic id
 * @uses get_the_term_list() To get the tags list
 * @return string Tag list of the topic
 */
function bbp_get_topic_tag_list($topic_id = 0, $args = array())
{
    // Bail if topic-tags are off
    if (!bbp_allow_topic_tags()) {
        return '';
    }
    // Parse arguments against default values
    $r = bbp_parse_args($args, array('before' => '<div class="bbp-topic-tags"><p>' . esc_html__('Tagged:', 'bbpress') . '&nbsp;', 'sep' => ', ', 'after' => '</p></div>', 'none' => ''), 'get_topic_tag_list');
    $topic_id = bbp_get_topic_id($topic_id);
    // Topic is spammed, so display pre-spam terms
    if (bbp_is_topic_spam($topic_id)) {
        // Get pre-spam terms
        $terms = get_post_meta($topic_id, '_bbp_spam_topic_tags', true);
        // If terms exist, implode them and compile the return value
        if (!empty($terms)) {
            $terms = $r['before'] . implode($r['sep'], $terms) . $r['after'];
        }
        // Topic is not spam so display a clickable term list
    } else {
        $terms = get_the_term_list($topic_id, bbp_get_topic_tag_tax_id(), $r['before'], $r['sep'], $r['after']);
    }
    // No terms so return none string
    if (!empty($terms)) {
        $retval = $terms;
    } else {
        $retval = $r['none'];
    }
    return $retval;
}
开发者ID:joeyblake,项目名称:bbpress,代码行数:43,代码来源:template.php

示例3: bbp_tab_index

					</div>
					<?php 
    }
    ?>
					<div class="checkbox">
						<input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" tabindex="<?php 
    bbp_tab_index();
    ?>
" />
						<label for="bbp_topic_favoriters"><?php 
    _e('Merge topic favoriters', 'bbpress');
    ?>
</label><br />
					</div>
					<?php 
    if (bbp_allow_topic_tags()) {
        ?>
					<div class="checkbox">
						<input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" tabindex="<?php 
        bbp_tab_index();
        ?>
" />
						<label for="bbp_topic_tags"><?php 
        _e('Merge topic tags', 'bbpress');
        ?>
</label><br />
					</div>
					<?php 
    }
    ?>
开发者ID:andychoi,项目名称:k-knowledgebase-theme-wp,代码行数:30,代码来源:form-topic-merge.php

示例4: bbp_is_topic_tag_edit

/**
 * Check if the current page is editing a topic tag
 *
 * @since bbPress (r3346)
 *
 * @uses WP_Query Checks if WP_Query::bbp_is_topic_tag_edit is true
 * @return bool True if editing a topic tag, false if not
 */
function bbp_is_topic_tag_edit()
{
    global $wp_query, $pagenow, $taxnow;
    // Bail if topic-tags are off
    if (!bbp_allow_topic_tags()) {
        return false;
    }
    // Assume false
    $retval = false;
    // Check query
    if (!empty($wp_query->bbp_is_topic_tag_edit) && true == $wp_query->bbp_is_topic_tag_edit) {
        $retval = true;
    } elseif (is_admin() && 'edit-tags.php' == $pagenow && bbp_get_topic_tag_tax_id() == $taxnow && (!empty($_GET['action']) && 'edit' == $_GET['action'])) {
        $retval = true;
    }
    return (bool) apply_filters('bbp_is_topic_tag_edit', $retval);
}
开发者ID:rmccue,项目名称:bbPress,代码行数:25,代码来源:bbp-common-template.php

示例5: bbp_edit_topic_handler


//.........这里部分代码省略.........
    if (empty($topic_title)) {
        bbp_add_error('bbp_edit_topic_title', __('<strong>ERROR</strong>: Your topic needs a title.', 'bbpress'));
    }
    /** Topic Content *********************************************************/
    if (!empty($_POST['bbp_topic_content'])) {
        $topic_content = $_POST['bbp_topic_content'];
    }
    // Filter and sanitize
    $topic_content = apply_filters('bbp_edit_topic_pre_content', $topic_content, $topic_id);
    // No topic content
    if (empty($topic_content)) {
        bbp_add_error('bbp_edit_topic_content', __('<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress'));
    }
    /** Topic Blacklist *******************************************************/
    if (!bbp_check_for_blacklist($anonymous_data, $topic_author, $topic_title, $topic_content)) {
        bbp_add_error('bbp_topic_blacklist', __('<strong>ERROR</strong>: Your topic cannot be edited at this time.', 'bbpress'));
    }
    /** Topic Status **********************************************************/
    // Maybe put into moderation
    if (!bbp_check_for_moderation($anonymous_data, $topic_author, $topic_title, $topic_content)) {
        // Set post status to pending if public or closed
        if (in_array($topic->post_status, array(bbp_get_public_status_id(), bbp_get_closed_status_id()))) {
            $topic_status = bbp_get_pending_status_id();
        }
        // Check a whitelist of possible topic status ID's
    } elseif (!empty($_POST['bbp_topic_status']) && in_array($_POST['bbp_topic_status'], array_keys(bbp_get_topic_statuses()))) {
        $topic_status = $_POST['bbp_topic_status'];
        // Use existing post_status
    } else {
        $topic_status = $topic->post_status;
    }
    /** Topic Tags ************************************************************/
    // Either replace terms
    if (bbp_allow_topic_tags() && current_user_can('assign_topic_tags') && !empty($_POST['bbp_topic_tags'])) {
        // Escape tag input
        $terms = esc_attr(strip_tags($_POST['bbp_topic_tags']));
        // Explode by comma
        if (strstr($terms, ',')) {
            $terms = explode(',', $terms);
        }
        // Add topic tag ID as main key
        $terms = array(bbp_get_topic_tag_tax_id() => $terms);
        // ...or remove them.
    } elseif (isset($_POST['bbp_topic_tags'])) {
        $terms = array(bbp_get_topic_tag_tax_id() => array());
        // Existing terms
    } else {
        $terms = array(bbp_get_topic_tag_tax_id() => explode(',', bbp_get_topic_tag_names($topic_id, ',')));
    }
    /** Additional Actions (Before Save) **************************************/
    do_action('bbp_edit_topic_pre_extras', $topic_id);
    // Bail if errors
    if (bbp_has_errors()) {
        return;
    }
    /** No Errors *************************************************************/
    // Add the content of the form to $topic_data as an array
    // Just in time manipulation of topic data before being edited
    $topic_data = apply_filters('bbp_edit_topic_pre_insert', array('ID' => $topic_id, 'post_title' => $topic_title, 'post_content' => $topic_content, 'post_status' => $topic_status, 'post_parent' => $forum_id, 'post_author' => $topic_author, 'post_type' => bbp_get_topic_post_type(), 'tax_input' => $terms));
    // Toggle revisions to avoid duplicates
    if (post_type_supports(bbp_get_topic_post_type(), 'revisions')) {
        $revisions_removed = true;
        remove_post_type_support(bbp_get_topic_post_type(), 'revisions');
    }
    // Insert topic
    $topic_id = wp_update_post($topic_data);
开发者ID:jenia-buianov,项目名称:all_my_sites,代码行数:67,代码来源:functions.php

示例6: bbp_get_statistics


//.........这里部分代码省略.........
 * @return object Walked forum tree
 */
function bbp_get_statistics($args = array())
{
    // Parse arguments against default values
    $r = bbp_parse_args($args, array('count_users' => true, 'count_forums' => true, 'count_topics' => true, 'count_pending_topics' => true, 'count_private_topics' => true, 'count_spammed_topics' => true, 'count_trashed_topics' => true, 'count_replies' => true, 'count_pending_replies' => true, 'count_private_replies' => true, 'count_spammed_replies' => true, 'count_trashed_replies' => true, 'count_tags' => true, 'count_empty_tags' => true), 'get_statistics');
    // Defaults
    $user_count = 0;
    $forum_count = 0;
    $topic_count = 0;
    $topic_count_hidden = 0;
    $reply_count = 0;
    $reply_count_hidden = 0;
    $topic_tag_count = 0;
    $empty_topic_tag_count = 0;
    // Users
    if (!empty($r['count_users'])) {
        $user_count = bbp_get_total_users();
    }
    // Forums
    if (!empty($r['count_forums'])) {
        $forum_count = wp_count_posts(bbp_get_forum_post_type())->publish;
    }
    // Post statuses
    $pending = bbp_get_pending_status_id();
    $private = bbp_get_private_status_id();
    $spam = bbp_get_spam_status_id();
    $trash = bbp_get_trash_status_id();
    $closed = bbp_get_closed_status_id();
    // Topics
    if (!empty($r['count_topics'])) {
        $all_topics = wp_count_posts(bbp_get_topic_post_type());
        // Published (publish + closed)
        $topic_count = $all_topics->publish + $all_topics->{$closed};
        if (current_user_can('read_private_topics') || current_user_can('edit_others_topics') || current_user_can('view_trash')) {
            // Declare empty arrays
            $topics = $topic_titles = array();
            // Pending
            $topics['pending'] = !empty($r['count_pending_topics']) && current_user_can('edit_others_topics') ? (int) $all_topics->{$pending} : 0;
            // Private
            $topics['private'] = !empty($r['count_private_topics']) && current_user_can('read_private_topics') ? (int) $all_topics->{$private} : 0;
            // Spam
            $topics['spammed'] = !empty($r['count_spammed_topics']) && current_user_can('edit_others_topics') ? (int) $all_topics->{$spam} : 0;
            // Trash
            $topics['trashed'] = !empty($r['count_trashed_topics']) && current_user_can('view_trash') ? (int) $all_topics->{$trash} : 0;
            // Total hidden (private + spam + trash)
            $topic_count_hidden = $topics['pending'] + $topics['private'] + $topics['spammed'] + $topics['trashed'];
            // Generate the hidden topic count's title attribute
            $topic_titles[] = !empty($topics['pending']) ? sprintf(__('Pending: %s', 'bbpress'), number_format_i18n($topics['pending'])) : '';
            $topic_titles[] = !empty($topics['private']) ? sprintf(__('Private: %s', 'bbpress'), number_format_i18n($topics['private'])) : '';
            $topic_titles[] = !empty($topics['spammed']) ? sprintf(__('Spammed: %s', 'bbpress'), number_format_i18n($topics['spammed'])) : '';
            $topic_titles[] = !empty($topics['trashed']) ? sprintf(__('Trashed: %s', 'bbpress'), number_format_i18n($topics['trashed'])) : '';
            // Compile the hidden topic title
            $hidden_topic_title = implode(' | ', array_filter($topic_titles));
        }
    }
    // Replies
    if (!empty($r['count_replies'])) {
        $all_replies = wp_count_posts(bbp_get_reply_post_type());
        // Published
        $reply_count = $all_replies->publish;
        if (current_user_can('read_private_replies') || current_user_can('edit_others_replies') || current_user_can('view_trash')) {
            // Declare empty arrays
            $replies = $reply_titles = array();
            // Pending
            $replies['pending'] = !empty($r['count_pending_replies']) && current_user_can('edit_others_replies') ? (int) $all_replies->{$pending} : 0;
            // Private
            $replies['private'] = !empty($r['count_private_replies']) && current_user_can('read_private_replies') ? (int) $all_replies->{$private} : 0;
            // Spam
            $replies['spammed'] = !empty($r['count_spammed_replies']) && current_user_can('edit_others_replies') ? (int) $all_replies->{$spam} : 0;
            // Trash
            $replies['trashed'] = !empty($r['count_trashed_replies']) && current_user_can('view_trash') ? (int) $all_replies->{$trash} : 0;
            // Total hidden (private + spam + trash)
            $reply_count_hidden = $replies['pending'] + $replies['private'] + $replies['spammed'] + $replies['trashed'];
            // Generate the hidden topic count's title attribute
            $reply_titles[] = !empty($replies['pending']) ? sprintf(__('Pending: %s', 'bbpress'), number_format_i18n($replies['pending'])) : '';
            $reply_titles[] = !empty($replies['private']) ? sprintf(__('Private: %s', 'bbpress'), number_format_i18n($replies['private'])) : '';
            $reply_titles[] = !empty($replies['spammed']) ? sprintf(__('Spammed: %s', 'bbpress'), number_format_i18n($replies['spammed'])) : '';
            $reply_titles[] = !empty($replies['trashed']) ? sprintf(__('Trashed: %s', 'bbpress'), number_format_i18n($replies['trashed'])) : '';
            // Compile the hidden replies title
            $hidden_reply_title = implode(' | ', array_filter($reply_titles));
        }
    }
    // Topic Tags
    if (!empty($r['count_tags']) && bbp_allow_topic_tags()) {
        // Get the count
        $topic_tag_count = wp_count_terms(bbp_get_topic_tag_tax_id(), array('hide_empty' => true));
        // Empty tags
        if (!empty($r['count_empty_tags']) && current_user_can('edit_topic_tags')) {
            $empty_topic_tag_count = wp_count_terms(bbp_get_topic_tag_tax_id()) - $topic_tag_count;
        }
    }
    // Tally the tallies
    $statistics = array_map('number_format_i18n', array_map('absint', compact('user_count', 'forum_count', 'topic_count', 'topic_count_hidden', 'reply_count', 'reply_count_hidden', 'topic_tag_count', 'empty_topic_tag_count')));
    // Add the hidden (topic/reply) count title attribute strings because we
    // don't need to run the math functions on these (see above)
    $statistics['hidden_topic_title'] = isset($hidden_topic_title) ? $hidden_topic_title : '';
    $statistics['hidden_reply_title'] = isset($hidden_reply_title) ? $hidden_reply_title : '';
    return apply_filters('bbp_get_statistics', $statistics, $r);
}
开发者ID:CompositeUK,项目名称:clone.bbPress,代码行数:101,代码来源:functions.php

示例7: bbp_edit_reply_handler


//.........这里部分代码省略.........
    $reply_title = apply_filters('bbp_edit_reply_pre_title', $reply_title, $reply_id);
    /** Reply Content *********************************************************/
    if (!empty($_POST['bbp_reply_content'])) {
        $reply_content = $_POST['bbp_reply_content'];
    }
    // Filter and sanitize
    $reply_content = apply_filters('bbp_edit_reply_pre_content', $reply_content, $reply_id);
    // No reply content
    if (empty($reply_content)) {
        bbp_add_error('bbp_edit_reply_content', __('<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress'));
    }
    /** Reply Blacklist *******************************************************/
    if (!bbp_check_for_blacklist($anonymous_data, $reply_author, $reply_title, $reply_content)) {
        bbp_add_error('bbp_reply_blacklist', __('<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress'));
    }
    /** Reply Status **********************************************************/
    // Maybe put into moderation
    if (!bbp_check_for_moderation($anonymous_data, $reply_author, $reply_title, $reply_content)) {
        // Set post status to pending if public
        if (bbp_get_public_status_id() === $reply->post_status) {
            $reply_status = bbp_get_pending_status_id();
        }
        // Use existing post_status
    } else {
        $reply_status = $reply->post_status;
    }
    /** Reply To **************************************************************/
    // Handle Reply To of the reply; $_REQUEST for non-JS submissions
    if (isset($_REQUEST['bbp_reply_to'])) {
        $reply_to = bbp_validate_reply_to($_REQUEST['bbp_reply_to']);
    }
    /** Topic Tags ************************************************************/
    // Either replace terms
    if (bbp_allow_topic_tags() && current_user_can('assign_topic_tags') && !empty($_POST['bbp_topic_tags'])) {
        $terms = esc_attr(strip_tags($_POST['bbp_topic_tags']));
        // ...or remove them.
    } elseif (isset($_POST['bbp_topic_tags'])) {
        $terms = '';
        // Existing terms
    } else {
        $terms = bbp_get_topic_tag_names($topic_id);
    }
    /** Additional Actions (Before Save) **************************************/
    do_action('bbp_edit_reply_pre_extras', $reply_id);
    // Bail if errors
    if (bbp_has_errors()) {
        return;
    }
    /** No Errors *************************************************************/
    // Add the content of the form to $reply_data as an array
    // Just in time manipulation of reply data before being edited
    $reply_data = apply_filters('bbp_edit_reply_pre_insert', array('ID' => $reply_id, 'post_title' => $reply_title, 'post_content' => $reply_content, 'post_status' => $reply_status, 'post_parent' => $topic_id, 'post_author' => $reply_author, 'post_type' => bbp_get_reply_post_type()));
    // Toggle revisions to avoid duplicates
    if (post_type_supports(bbp_get_reply_post_type(), 'revisions')) {
        $revisions_removed = true;
        remove_post_type_support(bbp_get_reply_post_type(), 'revisions');
    }
    // Insert topic
    $reply_id = wp_update_post($reply_data);
    // Toggle revisions back on
    if (true === $revisions_removed) {
        $revisions_removed = false;
        add_post_type_support(bbp_get_reply_post_type(), 'revisions');
    }
    /** Topic Tags ************************************************************/
    // Just in time manipulation of reply terms before being edited
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:67,代码来源:functions.php

示例8: register_taxonomies

 /**
  * Register the topic tag taxonomy
  *
  * @since bbPress (r2464)
  * @uses register_taxonomy() To register the taxonomy
  */
 public static function register_taxonomies()
 {
     // Register the topic-tag taxonomy
     register_taxonomy(bbp_get_topic_tag_tax_id(), bbp_get_topic_post_type(), apply_filters('bbp_register_topic_taxonomy', array('labels' => bbp_get_topic_tag_tax_labels(), 'rewrite' => bbp_get_topic_tag_tax_rewrite(), 'capabilities' => bbp_get_topic_tag_caps(), 'update_count_callback' => '_update_post_term_count', 'query_var' => true, 'show_tagcloud' => true, 'hierarchical' => false, 'show_in_nav_menus' => false, 'public' => true, 'show_ui' => bbp_allow_topic_tags() && current_user_can('bbp_topic_tags_admin'))));
 }
开发者ID:jenia-buianov,项目名称:all_my_sites,代码行数:11,代码来源:bbpress.php

示例9: bbp_dashboard_widget_right_now


//.........这里部分代码省略.........
    ?>
</td>
				<td class="t topics"><?php 
    echo $text;
    ?>
</td>

			</tr>

			<tr>

				<?php 
    $num = $r['reply_count'];
    $text = _n('Reply', 'Replies', $r['reply_count'], 'bbpress');
    if (current_user_can('publish_replies')) {
        $link = add_query_arg(array('post_type' => bbp_get_reply_post_type()), get_admin_url(null, 'edit.php'));
        $num = '<a href="' . esc_url($link) . '">' . $num . '</a>';
        $text = '<a href="' . esc_url($link) . '">' . $text . '</a>';
    }
    ?>

				<td class="first b b-replies"><?php 
    echo $num;
    ?>
</td>
				<td class="t replies"><?php 
    echo $text;
    ?>
</td>

			</tr>

			<?php 
    if (bbp_allow_topic_tags()) {
        ?>

				<tr>

					<?php 
        $num = $r['topic_tag_count'];
        $text = _n('Topic Tag', 'Topic Tags', $r['topic_tag_count'], 'bbpress');
        if (current_user_can('manage_topic_tags')) {
            $link = add_query_arg(array('taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type()), get_admin_url(null, 'edit-tags.php'));
            $num = '<a href="' . esc_url($link) . '">' . $num . '</a>';
            $text = '<a href="' . esc_url($link) . '">' . $text . '</a>';
        }
        ?>

					<td class="first b b-topic_tags"><span class="total-count"><?php 
        echo $num;
        ?>
</span></td>
					<td class="t topic_tags"><?php 
        echo $text;
        ?>
</td>

				</tr>

			<?php 
    }
    ?>

			<?php 
    do_action('bbp_dashboard_widget_right_now_content_table_end');
    ?>
开发者ID:joeyblake,项目名称:bbpress,代码行数:67,代码来源:metaboxes.php

示例10: bbp_get_topic_tag_list

/**
 * Return the tags of a topic
 *
 * @param int $topic_id Optional. Topic id
 * @param array $args This function supports these arguments:
 *  - before: Before the tag list
 *  - sep: Tag separator
 *  - after: After the tag list
 * @uses bbp_get_topic_id() To get the topic id
 * @uses get_the_term_list() To get the tags list
 * @return string Tag list of the topic
 */
function bbp_get_topic_tag_list($topic_id = 0, $args = '')
{
    // Bail if topic-tags are off
    if (!bbp_allow_topic_tags()) {
        return;
    }
    $defaults = array('before' => '<div class="bbp-topic-tags"><p>' . __('Tagged:', 'bbpress') . '&nbsp;', 'sep' => ', ', 'after' => '</p></div>');
    $r = bbp_parse_args($args, $defaults, 'get_topic_tag_list');
    extract($r);
    $topic_id = bbp_get_topic_id($topic_id);
    // Topic is spammed, so display pre-spam terms
    if (bbp_is_topic_spam($topic_id)) {
        // Get pre-spam terms
        $terms = get_post_meta($topic_id, '_bbp_spam_topic_tags', true);
        // If terms exist, explode them and compile the return value
        if (!empty($terms)) {
            $terms = implode($sep, $terms);
            $retval = $before . $terms . $after;
            // No terms so return emty string
        } else {
            $retval = '';
        }
        // Topic is not spam so display a clickable term list
    } else {
        $retval = get_the_term_list($topic_id, bbp_get_topic_tag_tax_id(), $before, $sep, $after);
    }
    return $retval;
}
开发者ID:rmccue,项目名称:bbPress,代码行数:40,代码来源:bbp-topic-template.php

示例11: bbp_admin_setting_callback_topic_tags

/**
 * Allow topic tags setting field
 *
 * @since 2.4.0 bbPress (r4944)
 *
 * @uses checked() To display the checked attribute
 */
function bbp_admin_setting_callback_topic_tags()
{
    ?>

	<input name="_bbp_allow_topic_tags" id="_bbp_allow_topic_tags" type="checkbox" value="1" <?php 
    checked(bbp_allow_topic_tags(true));
    bbp_maybe_admin_setting_disabled('_bbp_allow_topic_tags');
    ?>
 />
	<label for="_bbp_allow_topic_tags"><?php 
    esc_html_e('Allow topics to have tags', 'bbpress');
    ?>
</label>

<?php 
}
开发者ID:joeyblake,项目名称:bbpress,代码行数:23,代码来源:settings.php

示例12: _e

						<?php 
        if (bbp_is_reply_edit() && bbp_get_reply_author_id() !== bbp_get_current_user_id()) {
            _e('Notify the author of follow-up replies via email', 'bbpress');
        } else {
            _e('Notify me of follow-up replies via email', 'bbpress');
        }
        ?>
					</label>
				</div>
				<?php 
    }
    ?>
				
				<?php 
    // Moderators can edit topic tags
    if (current_user_can('moderate') || bbp_allow_topic_tags() && current_user_can('assign_topic_tags')) {
        ?>
				<div class="form-left">
					<label for="bbp_topic_tags"><i class="fa fa-tags"></i>Topic Tags:</label>
					<input type="text" value="<?php 
        bbp_form_topic_tags();
        ?>
" tabindex="<?php 
        bbp_tab_index();
        ?>
" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php 
        disabled(bbp_is_topic_spam());
        ?>
 />
				</div>
				<?php 
开发者ID:tamriel-foundry,项目名称:apoc2,代码行数:31,代码来源:form-topic.php

示例13: bbp_admin_setting_callback_topic_tags

/**
 * Allow topic tags setting field
 *
 * @since bbPress (r####)
 *
 * @uses checked() To display the checked attribute
 */
function bbp_admin_setting_callback_topic_tags()
{
    ?>

	<input id="_bbp_allow_topic_tags" name="_bbp_allow_topic_tags" type="checkbox" id="_bbp_allow_topic_tags" value="1" <?php 
    checked(bbp_allow_topic_tags(true));
    ?>
 />
	<label for="_bbp_allow_topic_tags"><?php 
    _e('Allow topics to have tags', 'bbpress');
    ?>
</label>

<?php 
}
开发者ID:rmccue,项目名称:bbPress,代码行数:22,代码来源:bbp-settings.php

示例14: register_taxonomies

 /**
  * Register the topic tag taxonomy
  *
  * @since bbPress (r2464)
  * @uses register_taxonomy() To register the taxonomy
  */
 public static function register_taxonomies()
 {
     // Define local variable(s)
     $topic_tag = array();
     // Topic tag labels
     $topic_tag['labels'] = array('name' => __('Topic Tags', 'bbpress'), 'singular_name' => __('Topic Tag', 'bbpress'), 'search_items' => __('Search Tags', 'bbpress'), 'popular_items' => __('Popular Tags', 'bbpress'), 'all_items' => __('All Tags', 'bbpress'), 'edit_item' => __('Edit Tag', 'bbpress'), 'update_item' => __('Update Tag', 'bbpress'), 'add_new_item' => __('Add New Tag', 'bbpress'), 'new_item_name' => __('New Tag Name', 'bbpress'), 'view_item' => __('View Topic Tag', 'bbpress'));
     // Topic tag rewrite
     $topic_tag['rewrite'] = array('slug' => bbp_get_topic_tag_tax_slug(), 'with_front' => false);
     // Register the topic tag taxonomy
     register_taxonomy(bbp_get_topic_tag_tax_id(), bbp_get_topic_post_type(), apply_filters('bbp_register_topic_taxonomy', array('labels' => $topic_tag['labels'], 'rewrite' => $topic_tag['rewrite'], 'capabilities' => bbp_get_topic_tag_caps(), 'update_count_callback' => '_update_post_term_count', 'query_var' => true, 'show_tagcloud' => true, 'hierarchical' => false, 'public' => true, 'show_ui' => bbp_allow_topic_tags() && current_user_can('bbp_topic_tags_admin'))));
 }
开发者ID:hscale,项目名称:webento,代码行数:17,代码来源:bbpress.php


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