INVP::vehicle_count()
This is a wrapper for wp_count_posts() and counts all vehicle posts.
Return Return
(int)
Source Source
File: includes/class-invp.php
public static function vehicle_count() {
$vehicle_counts = wp_count_posts( self::POST_TYPE );
if ( empty( $vehicle_counts->publish ) ) {
return 0;
}
return $vehicle_counts->publish;
}
Expand full source codeCollapse full source codeView on Github