Changeset 6730 for trunk/wp-admin/index.php
- Timestamp:
- 02/05/2008 07:08:14 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/index.php
r6705 r6730 38 38 39 39 <?php 40 $num_posts = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'");40 $num_posts = wp_count_posts('post', 'publish'); 41 41 42 $num_pages = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'page' AND post_status = 'publish'");42 $num_pages = wp_count_posts('page', 'publish'); 43 43 44 $num_drafts = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft'");44 $num_drafts = wp_count_posts('post', 'draft'); 45 45 46 $num_future = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'future'");46 $num_future = wp_count_posts('post', 'future'); 47 47 48 48 $num_comments = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
Note: See TracChangeset
for help on using the changeset viewer.