/** * Outputs a specific post's view count. This is a wrapper function for ev_get_post_views(). It simply * prints the output of that function to the screen. * * @since 1.0.0 * @access public * @param array $args * @return void */ function ev_post_views($args = array()) { echo ev_get_post_views($args); }
/** * Gets the number of views a specific post has. * * @since 1.0.0 * @access public * @param array $attr Attributes for use in the shortcode. * @return string */ function ev_entry_views_shortcode($attr = '') { $defaults = array('before' => '', 'after' => '', 'text' => '', 'post_id' => get_the_ID()); $attr = shortcode_atts($defaults, $attr, 'entry-views'); return ev_get_post_views($attr); }