Modify dashboard of wordpress

Wordpress官方说:现在Dashboard会立即显示出来,然后再在后台慢慢载入各个feed。
现在Dashboard不再是先读取feed,等3个feed读取完了再一起输出到浏览器,而是先输出到浏览器,然后在后台慢慢载入3个feed,载入完成后再显示出来。这样就不会再有国内的服务器因为不能访问Technorati而导致Dashboard载入很慢的问题了。
感觉还是不够快,那些新闻我从来都不看,对我来说就是额外的消耗。所以决定干掉它们发现原来的方法已经不可以了。看下源码,现在只要注释掉index-extra.php中的$rss = @fetch_rss就可以了,共有三处。或者直接删掉index.php中的6-13行。
<script type="text/javascript">
Event.observe( window, 'load', dashboard_init, false );
function dashboard_init() {
var update1 = new Ajax.Updater( 'incominglinks', 'index-extra.php?jax=incominglinks' );
var update2 = new Ajax.Updater( 'devnews', 'index-extra.php?jax=devnews' );
var update3 = new Ajax.Updater( 'planetnews', 'index-extra.php?jax=planetnews' );
}
</script>
Event.observe( window, 'load', dashboard_init, false );
function dashboard_init() {
var update1 = new Ajax.Updater( 'incominglinks', 'index-extra.php?jax=incominglinks' );
var update2 = new Ajax.Updater( 'devnews', 'index-extra.php?jax=devnews' );
var update3 = new Ajax.Updater( 'planetnews', 'index-extra.php?jax=planetnews' );
}
</script>
如果你还觉得不爽的话,还可以删除第62-79行:(最近已发布的文章列表)
<?php
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") ) :
?>
<div>
<h3><?php _e('Posts'); ?> <a href="edit.php" title="<?php _e('More posts...'); ?>">»</a></h3>
<ul>
<?php
foreach ($recentposts as $post) {
if ($post->post_title == '')
$post->post_title = sprintf(__('Post #%s'), $post->ID);
echo "<li><a href='post.php?action=edit&post=$post->ID'>";
the_title();
echo '</a></li>';
}
?>
</ul>
</div>
<?php endif; ?>
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") ) :
?>
<div>
<h3><?php _e('Posts'); ?> <a href="edit.php" title="<?php _e('More posts...'); ?>">»</a></h3>
<ul>
<?php
foreach ($recentposts as $post) {
if ($post->post_title == '')
$post->post_title = sprintf(__('Post #%s'), $post->ID);
echo "<li><a href='post.php?action=edit&post=$post->ID'>";
the_title();
echo '</a></li>';
}
?>
</ul>
</div>
<?php endif; ?>











谢谢。。呵呵