本文整理汇总了PHP中bbp_current_user_can_access_create_topic_form函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_current_user_can_access_create_topic_form函数的具体用法?PHP bbp_current_user_can_access_create_topic_form怎么用?PHP bbp_current_user_can_access_create_topic_form使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bbp_current_user_can_access_create_topic_form函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bbp_get_topic_write_link
function bbp_get_topic_write_link($args = '')
{
// Parse arguments against default values
$r = bbp_parse_args($args, array('id' => 0, 'link_before' => '', 'link_after' => '', 'write_text' => esc_html__('Write', 'bbpress')), 'get_topic_write_link');
if (!bbp_current_user_can_access_create_topic_form()) {
return;
}
// Get uri
$uri = bbp_get_topic_write_url($r['id']);
// Bail if no uri
if (empty($uri)) {
return;
}
$retval = $r['link_before'] . '<a href="' . esc_url($uri) . '" class="bbp-topic-write-link">' . $r['write_text'] . '</a>' . $r['link_after'];
return apply_filters('bbp_get_topic_write_link', $retval, $r);
}
示例2: bbp_topic_tag_list
?>
<?php
bbp_topic_tag_list(bbp_get_topic_id());
?>
<?php
bbp_single_topic_description(array('topic_id' => bbp_get_topic_id()));
?>
<?php
}
?>
<?php
if (bbp_current_user_can_access_create_topic_form()) {
?>
<div id="new-topic-<?php
bbp_topic_id();
?>
" class="bbp-topic-form">
<form id="new-post" name="new-post" method="post" action="<?php
the_permalink();
?>
">
<?php
do_action('bbp_theme_before_topic_form');
?>
示例3: bbp_forum_pagination_count
<div class="bbp-pagination well well-sm">
<div class="bbp-pagination-count text-primary">
<?php
bbp_forum_pagination_count();
?>
</div>
<div class="bbp-pagination-links">
<?php
bbp_forum_pagination_links();
?>
</div>
</div>
<?php
do_action('bbp_template_after_pagination_loop');
if (bbp_current_user_can_access_create_topic_form() && !bbp_is_topic_edit() && bbp_is_single_forum()) {
?>
<a href="#new-topic-<?php
bbp_topic_id();
?>
" class="btn btn-info pull-left"><span class="glyphicon ipt-icomoon-ticket"></span> <?php
_e('New Topic', 'ipt_kb');
?>
</a>
<?php
}
?>
<div class="clearfix"></div>
示例4: wm_bbp_search_form
function wm_bbp_search_form()
{
//Helper variables
$enable_button = apply_filters('wmhook_wm_bbp_search_form_enable_button', false);
$single_forum = $enable_button && bbp_is_single_forum() && bbp_current_user_can_access_create_topic_form();
//Output
if (bbp_allow_search()) {
echo '<div class="bbp-search-form">';
if ($single_forum) {
echo '<div class="wm-row"><div class="wm-column width-2-3">';
}
bbp_get_template_part('form', 'search');
if ($single_forum) {
echo '</div><div class="wm-column width-1-3 last">';
echo apply_filters('wmhook_wm_bbp_search_form_new_post_link', '<a href="#new-post" class="wm-button">' . __('Create a new topic', 'mustang') . '</a>');
echo '</div></div>';
}
echo '</div>';
}
}