Show
Ignore:
Timestamp:
10/12/07 16:21:15 (1 year ago)
Author:
donncha
Message:

Merge with WP 2.3 - testing use only!
Move pluggable functions out of wpmu-functions and into pluggable.php, fixes #439

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/index.php

    r1005 r1069  
    11<?php 
    2 require_once('admin.php');  
     2require_once('admin.php'); 
    33 
    44function index_js() { 
    55?> 
    66<script type="text/javascript"> 
    7 Event.observe( window, 'load', dashboard_init, false ); 
    8 function dashboard_init() { 
    9         var update1 = new Ajax.Updater( 'incominglinks', 'index-extra.php?jax=incominglinks' ); 
    10         var update2 = new Ajax.Updater( 'devnews', 'index-extra.php?jax=devnews' ); 
    11         var update3 = new Ajax.Updater( 'planetnews', 'index-extra.php?jax=planetnews'  ); 
    12 
     7        jQuery(function() { 
     8                jQuery('#incominglinks').load('index-extra.php?jax=incominglinks'); 
     9                jQuery('#devnews').load('index-extra.php?jax=devnews'); 
     10                jQuery('#planetnews').load('index-extra.php?jax=planetnews'); 
     11        }); 
    1312</script> 
    1413<?php 
    1514} 
    1615add_action( 'admin_head', 'index_js' ); 
    17 wp_enqueue_script('prototype'); 
    18 wp_enqueue_script('interface'); 
    1916 
    20 $title = __('Dashboard');  
     17wp_enqueue_script( 'jquery' ); 
     18 
     19$title = __('Dashboard'); 
    2120$parent_file = 'index.php'; 
    2221require_once('admin-header.php'); 
     
    4140?> 
    4241<div> 
    43 <h3><?php _e('Comments'); ?> <a href="edit-comments.php" title="<?php _e('More comments...'); ?>">&raquo;</a></h3> 
     42<h3><?php printf( __( 'Comments <a href="%s" title="More comments&#8230;">&raquo;</a>' ), 'edit-comments.php' ); ?></h3> 
    4443 
    4544<?php if ( $numcomments ) : ?> 
    46 <p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format($numcomments) ); ?> &raquo;</a></strong></p> 
     45<p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s) &raquo;'), number_format_i18n($numcomments) ); ?></a></strong></p> 
    4746<?php endif; ?> 
    4847 
     
    5150if ( $comments ) { 
    5251foreach ($comments as $comment) { 
    53         echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . apply_filters('the_title', get_the_title($comment->comment_post_ID)) . '</a>'); 
     52        echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>'); 
    5453        edit_comment_link(__("Edit"), ' <small>(', ')</small>'); 
    5554        echo '</li>'; 
     
    6564?> 
    6665<div> 
    67 <h3><?php _e('Posts'); ?> <a href="edit.php" title="<?php _e('More posts...'); ?>">&raquo;</a></h3> 
     66<h3><?php printf( __( 'Posts <a href="%s" title="More posts&#8230;">&raquo;</a>' ), 'edit.php' ); ?></h3> 
    6867<ul> 
    6968<?php 
     
    102101$numposts = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); 
    103102$numcomms = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); 
    104 $numcats  = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); 
     103$numcats  = wp_count_terms('category'); 
     104$numtags = wp_count_terms('post_tag'); 
    105105 
    106 $post_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Posts">post</a>', '%1$s <a href="%2$s" title="Posts">posts</a>', $numposts), number_format($numposts), 'edit.php'); 
    107 $comm_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Comments">comment</a>', '%1$s <a href="%2$s" title="Comments">comments</a>', $numcomms), number_format($numcomms), 'edit-comments.php'); 
    108 $cat_str  = sprintf(__ngettext('%1$s <a href="%2$s" title="Categories">category</a>', '%1$s <a href="%2$s" title="Categories">categories</a>', $numcats), number_format($numcats), 'categories.php'); 
     106$post_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Posts">post</a>', '%1$s <a href="%2$s" title="Posts">posts</a>', $numposts), number_format_i18n($numposts), 'edit.php'); 
     107$comm_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Comments">comment</a>', '%1$s <a href="%2$s" title="Comments">comments</a>', $numcomms), number_format_i18n($numcomms), 'edit-comments.php'); 
     108$cat_str  = sprintf(__ngettext('%1$s <a href="%2$s" title="Categories">category</a>', '%1$s <a href="%2$s" title="Categories">categories</a>', $numcats), number_format_i18n($numcats), 'categories.php'); 
     109$tag_str  = sprintf(__ngettext('%1$s tag', '%1$s tags', $numtags), number_format_i18n($numtags)); 
    109110?> 
    110111 
    111 <p><?php printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?></p> 
     112<p><?php printf(__('There are currently %1$s and %2$s, contained within %3$s and %4$s.'), $post_str, $comm_str, $cat_str, $tag_str); ?></p> 
    112113</div> 
    113114