Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/entry-vi.../inc
File: template.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Template functions for the plugin for use in WordPress themes.
[2] Fix | Delete
*
[3] Fix | Delete
* @package EntryViews
[4] Fix | Delete
* @version 1.0.0
[5] Fix | Delete
* @author Justin Tadlock <justin@justintadlock.com>
[6] Fix | Delete
* @copyright Copyright (c) 2010 - 2014, Justin Tadlock
[7] Fix | Delete
* @link http://themehybrid.com/plugins/entry-views
[8] Fix | Delete
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
[9] Fix | Delete
*/
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* Outputs a specific post's view count. This is a wrapper function for ev_get_post_views(). It simply
[13] Fix | Delete
* prints the output of that function to the screen.
[14] Fix | Delete
*
[15] Fix | Delete
* @since 1.0.0
[16] Fix | Delete
* @access public
[17] Fix | Delete
* @param array $args
[18] Fix | Delete
* @return void
[19] Fix | Delete
*/
[20] Fix | Delete
function ev_post_views( $args = array() ) {
[21] Fix | Delete
echo ev_get_post_views( $args );
[22] Fix | Delete
}
[23] Fix | Delete
[24] Fix | Delete
/**
[25] Fix | Delete
* Template tag for getting a specific post's view count. It will default to the current post in The
[26] Fix | Delete
* Loop. To use the 'text' argument, either pass a nooped plural using _n_noop() or a single text string.
[27] Fix | Delete
*
[28] Fix | Delete
* @since 1.0.0
[29] Fix | Delete
* @access public
[30] Fix | Delete
* @param array $args
[31] Fix | Delete
* @return string
[32] Fix | Delete
*/
[33] Fix | Delete
function ev_get_post_views( $args = array() ) {
[34] Fix | Delete
[35] Fix | Delete
$defaults = array(
[36] Fix | Delete
'post_id' => get_the_ID(),
[37] Fix | Delete
'before' => '',
[38] Fix | Delete
'after' => '',
[39] Fix | Delete
/* Translators: %s is the number of views a post has. */
[40] Fix | Delete
'text' => _n_noop( '%s View', '%s Views', 'entry-views' ),
[41] Fix | Delete
'wrap' => '<span %s>%s</span>'
[42] Fix | Delete
);
[43] Fix | Delete
[44] Fix | Delete
$args = wp_parse_args( $args, $defaults );
[45] Fix | Delete
[46] Fix | Delete
$views = ev_get_post_view_count( $args['post_id'] );
[47] Fix | Delete
[48] Fix | Delete
$text = is_array( $args['text'] ) ? translate_nooped_plural( $args['text'], $views ) : $args['text'];
[49] Fix | Delete
[50] Fix | Delete
$html = sprintf(
[51] Fix | Delete
$args['wrap'],
[52] Fix | Delete
'class="entry-views" itemprop="interactionCount" itemscope="itemscope" itemtype="http://schema.org/UserPageVisits"',
[53] Fix | Delete
sprintf( $text, $views )
[54] Fix | Delete
);
[55] Fix | Delete
[56] Fix | Delete
return $args['before'] . $html . $args['after'];
[57] Fix | Delete
}
[58] Fix | Delete
[59] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function