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


PHP bp_has_blogs函数代码示例

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


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

示例1: do_action

<?php

/**
 * Blogs loop
 *
 * @package BuddyPress
 * @subpackage Templatepack
 */
?>

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

<?php 
if (bp_has_blogs(bp_ajax_querystring('blogs'))) {
    ?>

	<div id="pagination-top" class="pagination">

		<div class="pagination-count">
			<?php 
    bp_blogs_pagination_count();
    ?>
		</div>

		<div class="pagination-links">
			<?php 
    bp_blogs_pagination_links();
    ?>
		</div>
开发者ID:wesavetheworld,项目名称:buddypress-templates,代码行数:31,代码来源:blogs-loop.php

示例2: do_action

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

	<div id="content">
		<div class="padder">

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

		<form action="" method="post" id="blogs-directory-form" class="dir-form">

			<?php 
global $bp_blogs, $blogs_template;
$bp_blogs = bp_has_blogs(bp_ajax_querystring('blogs'));
$max_pages = max(ceil($blogs_template->total_blog_count / 14), 1);
?>

			<h3><?php 
_e('Site Directory', 'huddle');
?>
</h3>
			<p class="subtitle">
				<?php 
bp_blogs_pagination_count();
?>
				<?php 
if (is_user_logged_in() && bp_blog_signup_enabled()) {
    ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn-gray quick-create-blog" href="<?php 
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:31,代码来源:index.php

示例3: bp_word_or_name

<div id="main">
	
  <div class="one-column">
    	
	<h2><?php 
bp_word_or_name(__("My Blogs", 'buddypress'), __("%s's Blogs", 'buddypress'));
?>
</h2>
	
	<?php 
do_action('template_notices');
?>

	<?php 
if (bp_has_blogs()) {
    ?>
		
		<ul id="blog-list" class="item-list">
			<?php 
    while (bp_blogs()) {
        bp_the_blog();
        ?>
				
				<li>
					<h4><a href="<?php 
        bp_blog_permalink();
        ?>
" title="<?php 
        bp_blog_title();
        ?>
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:30,代码来源:my-blogs.php

示例4: vibe_get_option

 * @package BuddyPress
 * @subpackage bp-default
 */
if (!defined('ABSPATH')) {
    exit;
}
$loop_number = vibe_get_option('loop_number');
isset($loop_number) ? $loop_number : ($loop_number = 5);
?>

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

<?php 
if (bp_has_blogs(bp_ajax_querystring('blogs') . '&per_page=' . $loop_number)) {
    ?>

	<div id="pag-top" class="pagination">

		<div class="pag-count" id="blog-dir-count-top">
			<?php 
    bp_blogs_pagination_count();
    ?>
		</div>

		<div class="pagination-links" id="blog-dir-pag-top">
			<?php 
    bp_blogs_pagination_links();
    ?>
		</div>
开发者ID:nikitansk,项目名称:devschool,代码行数:31,代码来源:blogs-loop.php

示例5: widget

    /**
     * load widget
     *
     * @name    widget
     * @author  Fabiano Rangel Cidade- <fabiano.rangel@gmail.com>
     * @since   2012-05-29
     * @updated 2012-05-29
     * @param   array $args - widget structure
     * @param   array $instance - widget data
     * @return  void
     */
    function widget($args, $instance)
    {
        ?>
				
	<ul class="tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
		<li class="9 ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-focus"><a href="#ultimas-blogadas">Últimas Blogadas na rede</a></li>
	</ul>

		
			<div class="activity">
			
				<div class="blogsTop">
					
						
						
						<?php 
        if (bp_has_blogs(bp_ajax_querystring('blogs') . 'max=10&per_page=10')) {
            ?>
				
						<ul>
						
						<?php 
            while (bp_blogs()) {
                bp_the_blog();
                ?>
						
							<li>
							
							<div class="avatarBlog2">
							<a href="<?php 
                bp_blog_permalink();
                ?>
"><?php 
                bp_blog_avatar('type=medium&width=55&height=55');
                ?>
</a></div>
							
							<div class="infoBlog">
								<span class="nomeBlog"><a href="<?php 
                bp_blog_permalink();
                ?>
"><?php 
                limit_chars(bp_get_blog_name(), 36);
                ?>
</a></span>
								<br /><span class="tituloPostBlog2"><a href="<?php 
                bp_blog_permalink();
                ?>
" title="">
						<?php 
                bp_blog_latest_post();
                ?>
</a></span>
							</div>
							
							</li>
						
						<?php 
            }
            ?>
						
						</ul>
						
						<?php 
        }
        ?>
						
						
											
				</div>
			</div>	
	
	


<br clear="all" />


		<?php 
    }
开发者ID:CoordCulturaDigital-Minc,项目名称:cdigital2014,代码行数:91,代码来源:widget-blogadas.php

示例6: widget

    function widget($args, $instance)
    {
        if (!function_exists('bp_is_active')) {
            return false;
        }
        extract($args);
        $blog_url = get_bloginfo('url');
        $title = apply_filters('widget_title', empty($instance['title']) ? 'Blogs Principais' : $instance['title']);
        $blogsIds = empty($instance['blogsIds']) ? '' : $instance['blogsIds'];
        $queryString = '&include_blog_ids=' . $blogsIds;
        $queryString .= '&max=30';
        $queryString .= '&type=active';
        print $before_widget;
        if (!empty($instance['title'])) {
            print $before_head;
            print $before_title . "<a href='{$blog_url}/blogs' title='ver todos os blogs'> " . $title . "</a>" . $after_title;
            print $after_head;
        }
        ?>
		<div id="principais-blogs">
			<div class="navigation">
			</div>

   			<?php 
        print $before_body;
        ?>
	

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

				<?php 
        if (bp_has_blogs(bp_ajax_querystring('blogs') . $queryString)) {
            ?>
			
				    <div id="blogs-dir-list" class="blogs dir-list carousel-blogs">

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

						<ul id="blogs-list" class="item-list slides" role="main">

							<?php 
            while (bp_blogs()) {
                bp_the_blog();
                ?>

								<li class="item">
									<div class="item-avatar">
										<a href="<?php 
                bp_blog_permalink();
                ?>
"><?php 
                bp_blog_avatar('type=full');
                ?>
</a>
									</div>

									<div class="item-caption">
										<div class="item-title"><a href="<?php 
                bp_blog_permalink();
                ?>
"><?php 
                bp_blog_name();
                ?>
</a></div>
										<!-- <div class="item-meta"><span class="activity"><?php 
                bp_blog_last_active(array('active_format' => false));
                ?>
</span></div> -->

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

										<div class="action">

											<?php 
                // do_action( 'bp_directory_blogs_actions' );
                ?>
										
										</div>

										<div class="meta">

											<a href="<?php 
                bp_blog_latest_post_permalink();
                ?>
" title="<?php 
                print bp_get_blog_latest_post_title();
                ?>
">
												<?php 
                echo limit_chars(bp_get_blog_latest_post_title(), 90);
                ?>
											</a>
										
//.........这里部分代码省略.........
开发者ID:CoordCulturaDigital-Minc,项目名称:cdigital2014,代码行数:101,代码来源:widget-blogs-principais.php

示例7: test_bp_blogs_update_meta_cache_bp_has_blogs_false

 /**
  * @group bp_blogs_update_meta_cache
  * @group bp_has_blogs
  */
 public function test_bp_blogs_update_meta_cache_bp_has_blogs_false()
 {
     if (!is_multisite()) {
         return;
     }
     $u = $this->factory->user->create();
     // Switch user so we have access to non-public blogs
     $old_user = get_current_user_id();
     $this->set_current_user($u);
     $b1 = $this->factory->blog->create();
     $b2 = $this->factory->blog->create();
     bp_blogs_record_blog($b1, $u, true);
     bp_blogs_record_blog($b2, $u, true);
     bp_blogs_add_blogmeta($b1, 'foo', 'bar');
     bp_blogs_add_blogmeta($b1, 'foo2', 'bar2');
     bp_blogs_add_blogmeta($b2, 'foo', 'bar');
     // Need this info
     $b1_name = bp_blogs_get_blogmeta($b1, 'name');
     $b1_description = bp_blogs_get_blogmeta($b1, 'description');
     $b1_last_activity = bp_blogs_get_blogmeta($b1, 'last_activity');
     $b2_name = bp_blogs_get_blogmeta($b2, 'name');
     $b2_description = bp_blogs_get_blogmeta($b2, 'description');
     $b2_last_activity = bp_blogs_get_blogmeta($b2, 'last_activity');
     // Clear caches (due to _get_)
     wp_cache_delete($b1, 'blog_meta');
     wp_cache_delete($b2, 'blog_meta');
     // Caches should be empty
     $this->assertFalse(wp_cache_get($b1, 'blog_meta'));
     $this->assertFalse(wp_cache_get($b2, 'blog_meta'));
     bp_has_blogs(array('update_meta_cache' => false));
     // Caches should be empty
     $this->assertFalse(wp_cache_get($b1, 'blog_meta'));
     $this->assertFalse(wp_cache_get($b2, 'blog_meta'));
     $this->set_current_user($old_user);
 }
开发者ID:JeroenNouws,项目名称:BuddyPress,代码行数:39,代码来源:cache.php


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