Changeset 217 for trunk/wp-content/themes/xpress_mu_home/home.php
- Timestamp:
- May 20, 2009, 12:41:15 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/xpress_mu_home/home.php
r213 r217 1 1 <?php get_header(); ?> 2 2 3 <div id="content" class="widecolumn"> 4 5 <h2>WordPress µ</h2> 6 <p>This is a <a href="http://mu.wordpress.org/">WordPress Mu</a> powered site.</p> 7 <p>You can: <ul><?php wp_register(); ?><li> <?php wp_loginout(); ?></li><li> <a href="wp-signup.php">Create a new blog</a></li><li> Edit this file at <code>wp-content/themes/home/home.php</code> with your favourite text editor and customize this screen.</li></ul></p> 8 <h3>The Latest News</h3> 9 <ul> 10 <strong>Site News</strong> 11 <?php 12 query_posts('showposts=7'); 13 if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?> 14 <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title();?> </a></li> 15 <?php endwhile; ?><?php endif; ?> 16 </ul> 17 <?php 18 $blogs = get_last_updated(); 19 if( is_array( $blogs ) ) { 20 ?> 3 <div id="content" class="widecolumn"> 4 <h3><?php _e('Site News', 'xpress'); ?></h3> 21 5 <ul> 22 <strong>Updated Blogs</strong> 23 <?php foreach( $blogs as $details ) { 24 ?><li><a href="http://<?php echo $details[ 'domain' ] . $details[ 'path' ] ?>"><?php echo get_blog_option( $details[ 'blog_id' ], 'blogname' ) ?></a></li><?php 6 <?php 7 query_posts('showposts=7'); 8 if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?> 9 <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title();?> </a></li> 10 <?php endwhile; ?><?php endif; ?> 11 </ul> 12 <br /> 13 <h3><?php _e('Blogs List', 'xpress'); ?></h3> 14 <?php 15 $blog_list = get_blog_list( 0, 'all' ); 16 echo "<ul>\n"; 17 foreach ($blog_list AS $blog) { 18 $url = 'http://' .$blog['domain'] .$blog['path']; 19 $blog_name = get_blog_option( $blog['blog_id'], 'blogname' ); 20 $post_count = $blog['postcount']; 21 22 echo "<li><a href=\" $url \"> $blog_name </a> (" . __('post count','xpress') . ":$post_count) </li>"; 23 } 24 echo "</ul>\n"; 25 ?> 26 <br /> 27 <h3><?php _e('Updated Blogs', 'xpress'); ?></h3> 28 <?php 29 $blogs = get_last_updated(); 30 if( is_array( $blogs ) ) { 31 ?> 32 <ul> 33 <?php foreach( $blogs as $details ) { 34 ?><li><a href="http://<?php echo $details[ 'domain' ] . $details[ 'path' ] ?>"><?php echo get_blog_option( $details[ 'blog_id' ], 'blogname' ) ?></a></li><?php 35 } 36 ?> 37 </ul> 38 <?php 25 39 } 26 40 ?> 27 </ul> 28 <?php 29 } 30 ?> 41 <br /> 42 <?php 43 $current_uid = get_current_user_id(); 44 if (!empty($current_uid)) { 45 $user_info = get_userdata($current_uid); 46 $display_name = $user_info->display_name; 47 echo '<h3>'; 48 printf(__('Howdy %s', 'xpress'),$display_name); 49 echo "</h3>\n"; 50 echo "<ul>\n"; 51 52 $user_blogs = get_blogs_of_user($current_uid); 53 if( is_array($user_blogs) ) { 54 echo '<li>' . __('Your Blogs list','xpress') ; 55 echo "<ul>\n"; 56 foreach( $user_blogs as $blog ) { 57 $url = 'http://' .$blog->domain .$blog->path; 58 $blog_name = $blog->blogname; 59 echo "<li><a href=\" $url \"> $blog_name </a></li>"; 60 } 61 echo "</ul>\n"; 62 echo "</li>\n"; 63 wp_register(); 64 } 65 echo '<li> <a href="wp-signup.php">' . __('Create a new blog','xpress') . "</a></li>\n"; 66 echo "</ul>\n"; 67 } 68 69 ?> 70 31 71 </div> 32 72
Note: See TracChangeset
for help on using the changeset viewer.