wpsc_post_count() WPSCache 1.0
No Hooks.
Return
Null. Nothing.
Usage
wpsc_post_count();
Code of wpsc_post_count() wpsc post count WPSCache 1.7.1
function wpsc_post_count() {
global $wpdb;
static $count;
if ( isset( $count ) ) {
return $count;
}
$post_type_list = wpsc_get_post_types();
$count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type IN ( $post_type_list ) AND post_status = 'publish'" );
return $count;
}