Version Description
N/A
Download this release
Release Info
Developer | GamerZ |
Plugin | WP-PostViews |
Version | 1.72 |
Comparing to | |
See all releases |
Code changes from version 1.71 to 1.72
- postviews-options.php +3 -2
- readme.txt +5 -2
- wp-postviews.php +12 -0
postviews-options.php
CHANGED
@@ -126,7 +126,8 @@ if( !isset ( $views_options['use_ajax'] ) ) {
|
|
126 |
- %POST_TIME%<br />
|
127 |
- %POST_EXCERPT%<br />
|
128 |
- %POST_CONTENT%<br />
|
129 |
-
- %POST_URL%<br
|
|
|
130 |
<input type="button" name="RestoreDefault" value="<?php _e( 'Restore Default Template', 'wp-postviews' ); ?>" onclick="views_default_templates( 'most_viewed' );" class="button" />
|
131 |
</td>
|
132 |
<td valign="top">
|
@@ -202,4 +203,4 @@ if( !isset ( $views_options['use_ajax'] ) ) {
|
|
202 |
<input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Changes', 'wp-postviews' ); ?>" />
|
203 |
</p>
|
204 |
</div>
|
205 |
-
</form>
|
126 |
- %POST_TIME%<br />
|
127 |
- %POST_EXCERPT%<br />
|
128 |
- %POST_CONTENT%<br />
|
129 |
+
- %POST_URL%<br />
|
130 |
+
- %POST_THUMBNAIL%<br /><br />
|
131 |
<input type="button" name="RestoreDefault" value="<?php _e( 'Restore Default Template', 'wp-postviews' ); ?>" onclick="views_default_templates( 'most_viewed' );" class="button" />
|
132 |
</td>
|
133 |
<td valign="top">
|
203 |
<input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Changes', 'wp-postviews' ); ?>" />
|
204 |
</p>
|
205 |
</div>
|
206 |
+
</form>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: GamerZ
|
|
3 |
Donate link: http://lesterchan.net/site/donation/
|
4 |
Tags: views, hits, counter, postviews
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
Enables you to display how many times a post/page had been viewed.
|
10 |
|
@@ -26,6 +26,9 @@ Enables you to display how many times a post/page had been viewed.
|
|
26 |
I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
|
27 |
|
28 |
== Changelog ==
|
|
|
|
|
|
|
29 |
= Version 1.71 =
|
30 |
* FIXED: Notices in Widget Constructor for WordPress 4.3
|
31 |
|
3 |
Donate link: http://lesterchan.net/site/donation/
|
4 |
Tags: views, hits, counter, postviews
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 4.4
|
7 |
+
Stable tag: 1.72
|
8 |
|
9 |
Enables you to display how many times a post/page had been viewed.
|
10 |
|
26 |
I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
|
27 |
|
28 |
== Changelog ==
|
29 |
+
= Version 1.72 =
|
30 |
+
* NEW: Add %POST_THUMBNAIL% to template variables
|
31 |
+
|
32 |
= Version 1.71 =
|
33 |
* FIXED: Notices in Widget Constructor for WordPress 4.3
|
34 |
|
wp-postviews.php
CHANGED
@@ -258,6 +258,7 @@ if(!function_exists('get_least_viewed')) {
|
|
258 |
$post_title = snippet_text($post_title, $chars);
|
259 |
}
|
260 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
|
|
261 |
$temp = stripslashes($views_options['most_viewed_template']);
|
262 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp);
|
263 |
$temp = str_replace("%VIEW_COUNT_ROUNDED%", postviews_round_number( $post_views ), $temp);
|
@@ -267,6 +268,7 @@ if(!function_exists('get_least_viewed')) {
|
|
267 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
268 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
269 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
|
|
270 |
$output .= $temp;
|
271 |
}
|
272 |
} else {
|
@@ -307,6 +309,7 @@ if(!function_exists('get_most_viewed')) {
|
|
307 |
if($chars > 0) {
|
308 |
$post_title = snippet_text($post_title, $chars);
|
309 |
}
|
|
|
310 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
311 |
$temp = stripslashes($views_options['most_viewed_template']);
|
312 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n( $post_views ), $temp);
|
@@ -317,6 +320,7 @@ if(!function_exists('get_most_viewed')) {
|
|
317 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
318 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
319 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
|
|
320 |
$output .= $temp;
|
321 |
}
|
322 |
} else {
|
@@ -362,6 +366,7 @@ if(!function_exists('get_least_viewed_category')) {
|
|
362 |
if($chars > 0) {
|
363 |
$post_title = snippet_text($post_title, $chars);
|
364 |
}
|
|
|
365 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
366 |
$temp = stripslashes($views_options['most_viewed_template']);
|
367 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp);
|
@@ -371,6 +376,7 @@ if(!function_exists('get_least_viewed_category')) {
|
|
371 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
372 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
373 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
|
|
374 |
$output .= $temp;
|
375 |
}
|
376 |
} else {
|
@@ -416,6 +422,7 @@ if(!function_exists('get_most_viewed_category')) {
|
|
416 |
if($chars > 0) {
|
417 |
$post_title = snippet_text($post_title, $chars);
|
418 |
}
|
|
|
419 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
420 |
$temp = stripslashes($views_options['most_viewed_template']);
|
421 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp);
|
@@ -425,6 +432,7 @@ if(!function_exists('get_most_viewed_category')) {
|
|
425 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
426 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
427 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
|
|
428 |
$output .= $temp;
|
429 |
}
|
430 |
} else {
|
@@ -470,6 +478,7 @@ if(!function_exists('get_most_viewed_tag')) {
|
|
470 |
if($chars > 0) {
|
471 |
$post_title = snippet_text($post_title, $chars);
|
472 |
}
|
|
|
473 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
474 |
$temp = stripslashes($views_options['most_viewed_template']);
|
475 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp);
|
@@ -479,6 +488,7 @@ if(!function_exists('get_most_viewed_tag')) {
|
|
479 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
480 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
481 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
|
|
482 |
$output .= $temp;
|
483 |
}
|
484 |
} else {
|
@@ -524,6 +534,7 @@ if(!function_exists('get_least_viewed_tag')) {
|
|
524 |
if($chars > 0) {
|
525 |
$post_title = snippet_text($post_title, $chars);
|
526 |
}
|
|
|
527 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
528 |
$temp = stripslashes($views_options['most_viewed_template']);
|
529 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp);
|
@@ -533,6 +544,7 @@ if(!function_exists('get_least_viewed_tag')) {
|
|
533 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
534 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
535 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
|
|
536 |
$output .= $temp;
|
537 |
}
|
538 |
} else {
|
258 |
$post_title = snippet_text($post_title, $chars);
|
259 |
}
|
260 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
261 |
+
$thumbnail = get_the_post_thumbnail($post->ID,'thumbnail',true);
|
262 |
$temp = stripslashes($views_options['most_viewed_template']);
|
263 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp);
|
264 |
$temp = str_replace("%VIEW_COUNT_ROUNDED%", postviews_round_number( $post_views ), $temp);
|
268 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
269 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
270 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
271 |
+
$temp = str_replace("%POST_THUMBNAIL%", $thumbnail, $temp);
|
272 |
$output .= $temp;
|
273 |
}
|
274 |
} else {
|
309 |
if($chars > 0) {
|
310 |
$post_title = snippet_text($post_title, $chars);
|
311 |
}
|
312 |
+
$thumbnail = get_the_post_thumbnail($post->ID,'thumbnail',true);
|
313 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
314 |
$temp = stripslashes($views_options['most_viewed_template']);
|
315 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n( $post_views ), $temp);
|
320 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
321 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
322 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
323 |
+
$temp = str_replace("%POST_THUMBNAIL%", $thumbnail, $temp);
|
324 |
$output .= $temp;
|
325 |
}
|
326 |
} else {
|
366 |
if($chars > 0) {
|
367 |
$post_title = snippet_text($post_title, $chars);
|
368 |
}
|
369 |
+
$thumbnail = get_the_post_thumbnail($post->ID,'thumbnail',true);
|
370 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
371 |
$temp = stripslashes($views_options['most_viewed_template']);
|
372 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp);
|
376 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
377 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
378 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
379 |
+
$temp = str_replace("%POST_THUMBNAIL%", $thumbnail, $temp);
|
380 |
$output .= $temp;
|
381 |
}
|
382 |
} else {
|
422 |
if($chars > 0) {
|
423 |
$post_title = snippet_text($post_title, $chars);
|
424 |
}
|
425 |
+
$thumbnail = get_the_post_thumbnail($post->ID,'thumbnail',true);
|
426 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
427 |
$temp = stripslashes($views_options['most_viewed_template']);
|
428 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp);
|
432 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
433 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
434 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
435 |
+
$temp = str_replace("%POST_THUMBNAIL%", $thumbnail, $temp);
|
436 |
$output .= $temp;
|
437 |
}
|
438 |
} else {
|
478 |
if($chars > 0) {
|
479 |
$post_title = snippet_text($post_title, $chars);
|
480 |
}
|
481 |
+
$thumbnail = get_the_post_thumbnail($post->ID,'thumbnail',true);
|
482 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
483 |
$temp = stripslashes($views_options['most_viewed_template']);
|
484 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp);
|
488 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
489 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
490 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
491 |
+
$temp = str_replace("%POST_THUMBNAIL%", $thumbnail, $temp);
|
492 |
$output .= $temp;
|
493 |
}
|
494 |
} else {
|
534 |
if($chars > 0) {
|
535 |
$post_title = snippet_text($post_title, $chars);
|
536 |
}
|
537 |
+
$thumbnail = get_the_post_thumbnail($post->ID,'thumbnail',true);
|
538 |
$post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
|
539 |
$temp = stripslashes($views_options['most_viewed_template']);
|
540 |
$temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp);
|
544 |
$temp = str_replace("%POST_URL%", get_permalink($post), $temp);
|
545 |
$temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp);
|
546 |
$temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp);
|
547 |
+
$temp = str_replace("%POST_THUMBNAIL%", $thumbnail, $temp);
|
548 |
$output .= $temp;
|
549 |
}
|
550 |
} else {
|