1 | <?php get_header(); ?>
|
---|
2 |
|
---|
3 | <div id="content" class="widecolumn">
|
---|
4 | <h3><?php _e('Site News', 'xpress'); ?></h3>
|
---|
5 | <ul>
|
---|
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
|
---|
39 | }
|
---|
40 | ?>
|
---|
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 |
|
---|
71 | </div>
|
---|
72 |
|
---|
73 | <?php get_footer(); ?>
|
---|