Changes in trunk/wp-admin/index.php [4399:3443]
- File:
-
- 1 edited
-
trunk/wp-admin/index.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/index.php
r4399 r3443 2 2 require_once('admin.php'); 3 3 $title = __('Dashboard'); 4 $parent_file = 'index.php';5 4 require_once('admin-header.php'); 6 require_once (ABSPATH . WPINC . '/rss .php');5 require_once (ABSPATH . WPINC . '/rss-functions.php'); 7 6 8 7 $today = current_time('mysql', 1); … … 11 10 <div class="wrap"> 12 11 13 <h2><?php _e(' Welcome to WordPress'); ?></h2>12 <h2><?php _e('Dashboard'); ?></h2> 14 13 15 14 <div id="zeitgeist"> … … 21 20 ?> 22 21 <div id="incominglinks"> 23 <h3><?php _e('Incoming Links'); ?> <cite><a href="http://www.technorati.com/search/<?php echo trailingslashit(get_option('home')); ?>?partner=wordpress"><?php _e('More »'); ?></a></cite></h3>22 <h3><?php _e('Incoming Links'); ?> <cite><a href="http://www.technorati.com/search/<?php echo trailingslashit(get_option('home')); ?>?partner=wordpress"><?php _e('More'); ?> »</a></cite></h3> 24 23 <ul> 25 24 <?php … … 27 26 foreach ($rss->items as $item ) { 28 27 ?> 29 <li><a href="<?php echo wp_filter_kses($item['link']); ?>"><?php echo wp texturize(wp_specialchars($item['title'])); ?></a></li>28 <li><a href="<?php echo wp_filter_kses($item['link']); ?>"><?php echo wp_specialchars($item['title']); ?></a></li> 30 29 <?php } ?> 31 30 </ul> … … 45 44 <p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format($numcomments) ); ?> »</a></strong></p> 46 45 <?php endif; ?> 46 </div> 47 47 48 48 <ul> … … 57 57 ?> 58 58 </ul> 59 </div> 59 60 60 <?php endif; ?> 61 61 62 62 <?php 63 if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_ type = 'post' AND post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5") ) :63 if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5") ) : 64 64 ?> 65 65 <div> … … 80 80 81 81 <?php 82 if ( $scheduled = $wpdb->get_results("SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_ type = 'post' AND post_status = 'future' ORDER BY post_date ASC") ) :82 if ( $scheduled = $wpdb->get_results("SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt > '$today' ORDER BY post_date ASC") ) : 83 83 ?> 84 84 <div> … … 99 99 <h3><?php _e('Blog Stats'); ?></h3> 100 100 <?php 101 $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_ type = 'post' AND post_status = 'publish'");101 $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'"); 102 102 if (0 < $numposts) $numposts = number_format($numposts); 103 103 … … 114 114 </div> 115 115 116 <h3><?php _e('Welcome to WordPress'); ?></h3> 117 116 118 <p><?php _e('Use these links to get started:'); ?></p> 117 119 118 120 <ul> 119 <?php if ( current_user_can('edit_posts') ) : ?> 120 <li><a href="post-new.php"><?php _e('Write a post'); ?></a></li> 121 <?php endif; ?> 122 <li><a href="profile.php"><?php _e('Update your profile or change your password'); ?></a></li> 123 <?php if ( current_user_can('manage_links') ) : ?> 124 <li><a href="link-add.php"><?php _e('Add a bookmark to your blogroll'); ?></a></li> 125 <?php endif; ?> 126 <?php if ( current_user_can('switch_themes') ) : ?> 127 <li><a href="themes.php"><?php _e('Change your site’s look or theme'); ?></a></li> 128 <?php endif; ?> 121 <li><a href="post.php"><?php _e('Write a post'); ?></a></li> 122 <li><a href="profile.php"><?php _e('Update your profile or change your password'); ?></a></li> 123 <li><a href="link-add.php"><?php _e('Add a link to your blogroll'); ?></a></li> 124 <li><a href="themes.php"><?php _e('Change your site’s look or theme'); ?></a></li> 129 125 </ul> 130 <p><?php _e("Need help with WordPress? Please see our <a href='http://codex.wordpress.org/'>documentation</a> or visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p> 126 127 <p><?php _e("Below is the latest news from the official WordPress development blog, click on a title to read the full entry. If you need help with WordPress please see our <a href='http://codex.wordpress.org/'>great documentation</a> or if that doesn't help visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p> 131 128 <?php 132 129 $rss = @fetch_rss('http://wordpress.org/development/feed/'); 133 130 if ( isset($rss->items) && 0 != count($rss->items) ) { 134 131 ?> 135 <div id="devnews">136 132 <h3><?php _e('WordPress Development Blog'); ?></h3> 137 133 <?php … … 145 141 } 146 142 ?> 147 </div> 143 148 144 149 145 <?php … … 152 148 ?> 153 149 <div id="planetnews"> 154 <h3><?php _e('Other WordPress News'); ?> </h3>150 <h3><?php _e('Other WordPress News'); ?> <a href="http://planet.wordpress.org/"><?php _e('more'); ?> »</a></h3> 155 151 <ul> 156 152 <?php 157 153 $rss->items = array_slice($rss->items, 0, 20); 158 154 foreach ($rss->items as $item ) { 159 $title = wp_specialchars($item['title']);160 $author = preg_replace( '|(.+?):.+|s', '$1', $item['title'] );161 $post = preg_replace( '|.+?:(.+)|s', '$1', $item['title'] );162 155 ?> 163 <li><a href='<?php echo wp_filter_kses($item['link']); ?>'>< span class="post"><?php echo $post; ?></span><span class="hidden"> - </span><cite><?php echo $author; ?></cite></a></li>156 <li><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a></li> 164 157 <?php 165 158 } 166 159 ?> 167 160 </ul> 168 <p class="readmore"><a href="http://planet.wordpress.org/"><?php _e('Read more'); ?> »</a></p>169 161 </div> 170 162 <?php
Note: See TracChangeset
for help on using the changeset viewer.