On Tue, Feb 5, 2008 at 2:18 PM, ]V[orlock Zernebock <[EMAIL PROTECTED]> wrote:
> Maybe I'm too noob in PHP but I searched for "wp_count_posts" function
> inside "wp-includes/post.php" and I didn't find it.
svn update to get it. It's new.
function wp_count_posts( $type = 'post', $status = 'publish' ) {
global $wpdb;
return $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM
$wpdb->posts WHERE post_type = %s AND post_status = %s", $type,
$status) );
}
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers