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


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怎么用?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);
}
开发者ID:082net,项目名称:bbpresskr,代码行数:16,代码来源:functions.php

示例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');
    ?>
开发者ID:severnrescue,项目名称:web,代码行数:31,代码来源:form-topic.php

示例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>
开发者ID:andychoi,项目名称:k-knowledgebase-theme-wp,代码行数:29,代码来源:pagination-topics.php

示例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>';
     }
 }
开发者ID:pab44,项目名称:pab44,代码行数:20,代码来源:setup-bbpress.php


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