You appear to be a bot. Output may be restricted
Description
Usage
bw_count( $atts, $content, $tag );
Parameters
- $atts
- ( mixed ) optional –
- $content
- ( mixed ) optional –
- $tag
- ( mixed ) optional –
Returns
voidSource
File name: oik/shortcodes/oik-count.phpLines:
1 to 16 of 16
function bw_count( $atts=null, $content=null, $tag=null ) { $post_type = bw_array_get_from( $atts, "post_type,0", "post" ); $count = wp_count_posts( $post_type ); $status = bw_array_get_from( $atts, "status,1", "publish" ); span( "bw_count $post_type $status"); if ( property_exists( $count, $status ) ) { e( $count->$status ); } elseif ( property_exists( $count, "publish" ) ) { e( $count->publish ); } else { e( "No count available for $post_type $status" ); } epan(); bw_trace2( $count, "count", false, BW_TRACE_VERBOSE ); return( bw_ret() ); }View on GitHub View on Trac