sbrajesh

Brajesh Singh

Sep 26th, 2010
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1.  /*Show a bulleted list of recently created blogs */
  2.  function bpdev_show_recent_updated_blogs($number_blogs=5,$description=true)
  3.  {
  4.  $recent_blogs=bpdev_get_recent_updated_blogs($number_blogs);
  5.                    
  6. foreach($recent_blogs as $recent_blog):
  7.  
  8. $excluded_blog_ids=array(2,3,4,5);//put all the excluded blog ids here
  9. if(in_array($recent_blog->blog_id,$excluded_blog_ids))
  10.     continue;
  11.                     $blog_url="";
  12.                 if( defined( "VHOST" ) && constant( "VHOST" ) == 'yes' )
  13.                     $blog_url="http://".$recent_blog->domain.$recent_blog->path;
  14.                     else
  15.                     $blog_url="http://".$recent_blog->domain.$recent_blog->path;
  16.                     $blog_name=get_blog_option($recent_blog->blog_id,"blogname");
  17. ?>
  18.  <li>
  19.         <a href="<?php echo $blog_url;?>"><?php _e( $blog_name)?> </a>
  20.     <?php if($description):?>
  21.     <span><?php _e( get_blog_option($recent_blog->blog_id,"blogdescription"));?></span>
  22.     <?php endif;?>
  23. </li>
  24.  <?php endforeach;?>
  25. <?php
  26.  }
Add Comment
Please, Sign In to add comment