Version Description
- WPCS updates.
- Fixes an issue where excerpts may output broken HTML under certain conditions (thanks ozboss1!)
Release notes
Download this release
Release Info
Developer | hcabrera |
Plugin | WordPress Popular Posts |
Version | 6.0.3 |
Comparing to | |
See all releases |
Code changes from version 6.0.2 to 6.0.3
- assets/js/blocks/block-wpp-widget.asset.php +1 -1
- readme.txt +11 -2
- src/Admin/Admin.php +8 -8
- src/Admin/admin-page.php +3 -3
- src/Admin/screen-stats.php +3 -3
- src/Output.php +3 -0
- src/Widget/form.php +6 -6
- wordpress-popular-posts.php +2 -2
assets/js/blocks/block-wpp-widget.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array(), 'version' => '395406e7ac1694e159d8');
|
1 |
+
<?php return array('dependencies' => array(), 'version' => '395406e7ac1694e159d8');
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: hcabrera
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hcabrerab%40gmail%2ecom&lc=GB&item_name=WordPress%20Popular%20Posts%20Plugin¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted
|
4 |
Tags: popular, posts, widget, popularity, top
|
5 |
Requires at least: 5.3
|
6 |
-
Tested up to: 6.0
|
7 |
Requires PHP: 7.2
|
8 |
-
Stable tag: 6.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -109,10 +109,19 @@ The FAQ section has been moved [here](https://github.com/cabrerahector/wordpress
|
|
109 |
|
110 |
== Changelog ==
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
= 6.0.2 =
|
113 |
|
114 |
- Fixes issue with Stats dashboard not loading for Linux users (thanks agbuere!)
|
115 |
|
|
|
|
|
116 |
= 6.0.1 =
|
117 |
|
118 |
- Security improvements.
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hcabrerab%40gmail%2ecom&lc=GB&item_name=WordPress%20Popular%20Posts%20Plugin¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted
|
4 |
Tags: popular, posts, widget, popularity, top
|
5 |
Requires at least: 5.3
|
6 |
+
Tested up to: 6.0.1
|
7 |
Requires PHP: 7.2
|
8 |
+
Stable tag: 6.0.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
109 |
|
110 |
== Changelog ==
|
111 |
|
112 |
+
= 6.0.3 =
|
113 |
+
|
114 |
+
- WPCS updates.
|
115 |
+
- Fixes an issue where excerpts may output broken HTML under certain conditions (thanks ozboss1!)
|
116 |
+
|
117 |
+
[Release notes](https://cabrerahector.com/wordpress/wordpress-popular-posts-6-0-php-5-support-dropped-minimum-supported-wordpress-changed/#6.0.3)
|
118 |
+
|
119 |
= 6.0.2 =
|
120 |
|
121 |
- Fixes issue with Stats dashboard not loading for Linux users (thanks agbuere!)
|
122 |
|
123 |
+
[Release notes](https://cabrerahector.com/wordpress/wordpress-popular-posts-6-0-php-5-support-dropped-minimum-supported-wordpress-changed/#6.0.2)
|
124 |
+
|
125 |
= 6.0.1 =
|
126 |
|
127 |
- Security improvements.
|
src/Admin/Admin.php
CHANGED
@@ -741,7 +741,7 @@ class Admin {
|
|
741 |
$total_views = array_sum($views);
|
742 |
$total_comments = array_sum($comments);
|
743 |
|
744 |
-
$label_summary = sprintf(_n('%s view', '%s views', $total_views, 'wordpress-popular-posts'), '<strong>' . number_format_i18n($total_views) . '</strong>') . '
|
745 |
|
746 |
// Format labels
|
747 |
if ( 'today' != $range ) {
|
@@ -839,7 +839,7 @@ class Admin {
|
|
839 |
$dates = null;
|
840 |
|
841 |
if ( isset($_GET['dates']) ) {
|
842 |
-
$dates = explode(" ~ ", $_GET['dates']);
|
843 |
|
844 |
if (
|
845 |
! is_array($dates)
|
@@ -1011,7 +1011,7 @@ class Admin {
|
|
1011 |
$dates = null;
|
1012 |
|
1013 |
if ( isset($_GET['dates']) ) {
|
1014 |
-
$dates = explode(" ~ ", $_GET['dates']);
|
1015 |
|
1016 |
if (
|
1017 |
! is_array($dates)
|
@@ -1157,8 +1157,8 @@ class Admin {
|
|
1157 |
*/
|
1158 |
public function clear_data()
|
1159 |
{
|
1160 |
-
$token = isset($_POST['token']) ? $_POST['token'] : null;
|
1161 |
-
$clear = isset($_POST['clear']) ? $_POST['clear'] : null;
|
1162 |
|
1163 |
if (
|
1164 |
current_user_can('manage_options')
|
@@ -1230,7 +1230,7 @@ class Admin {
|
|
1230 |
$wpp_uploads_dir = $this->thumbnail->get_plugin_uploads_dir();
|
1231 |
|
1232 |
if ( is_array($wpp_uploads_dir) && ! empty($wpp_uploads_dir) ) {
|
1233 |
-
$token = isset($_POST['token']) ? $_POST['token'] : null;
|
1234 |
|
1235 |
if (
|
1236 |
current_user_can('edit_published_posts')
|
@@ -1425,8 +1425,8 @@ class Admin {
|
|
1425 |
$response = [
|
1426 |
'status' => 'error'
|
1427 |
];
|
1428 |
-
$token = isset($_POST['token']) ? $_POST['token'] : null;
|
1429 |
-
$dismiss = isset($_POST['dismiss']) ? $_POST['dismiss'] : 0;
|
1430 |
|
1431 |
if (
|
1432 |
current_user_can('manage_options')
|
741 |
$total_views = array_sum($views);
|
742 |
$total_comments = array_sum($comments);
|
743 |
|
744 |
+
$label_summary = sprintf(_n('%s view', '%s views', $total_views, 'wordpress-popular-posts'), '<strong>' . number_format_i18n($total_views) . '</strong>') . ' / ' . sprintf(_n('%s comment', '%s comments', $total_comments, 'wordpress-popular-posts'), '<strong>' . number_format_i18n($total_comments) . '</strong>');
|
745 |
|
746 |
// Format labels
|
747 |
if ( 'today' != $range ) {
|
839 |
$dates = null;
|
840 |
|
841 |
if ( isset($_GET['dates']) ) {
|
842 |
+
$dates = explode(" ~ ", esc_html($_GET['dates']));
|
843 |
|
844 |
if (
|
845 |
! is_array($dates)
|
1011 |
$dates = null;
|
1012 |
|
1013 |
if ( isset($_GET['dates']) ) {
|
1014 |
+
$dates = explode(" ~ ", esc_html($_GET['dates']));
|
1015 |
|
1016 |
if (
|
1017 |
! is_array($dates)
|
1157 |
*/
|
1158 |
public function clear_data()
|
1159 |
{
|
1160 |
+
$token = isset($_POST['token']) ? $_POST['token'] : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is a nonce
|
1161 |
+
$clear = isset($_POST['clear']) ? $_POST['clear'] : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
1162 |
|
1163 |
if (
|
1164 |
current_user_can('manage_options')
|
1230 |
$wpp_uploads_dir = $this->thumbnail->get_plugin_uploads_dir();
|
1231 |
|
1232 |
if ( is_array($wpp_uploads_dir) && ! empty($wpp_uploads_dir) ) {
|
1233 |
+
$token = isset($_POST['token']) ? $_POST['token'] : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is a nonce
|
1234 |
|
1235 |
if (
|
1236 |
current_user_can('edit_published_posts')
|
1425 |
$response = [
|
1426 |
'status' => 'error'
|
1427 |
];
|
1428 |
+
$token = isset($_POST['token']) ? $_POST['token'] : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is a nonce
|
1429 |
+
$dismiss = isset($_POST['dismiss']) ? (int) $_POST['dismiss'] : 0;
|
1430 |
|
1431 |
if (
|
1432 |
current_user_can('manage_options')
|
src/Admin/admin-page.php
CHANGED
@@ -58,8 +58,8 @@ if ( isset($_POST['section']) ) {
|
|
58 |
$this->flush_transients();
|
59 |
}
|
60 |
|
61 |
-
$this->config['tools']['thumbnail']['source'] = $_POST['thumb_source'];
|
62 |
-
$this->config['tools']['thumbnail']['field'] = ( ! empty($_POST['thumb_field']) ) ? $_POST['thumb_field'] : "wpp_thumbnail";
|
63 |
$this->config['tools']['thumbnail']['default'] = ( ! empty($_POST['upload_thumb_src']) ) ? $_POST['upload_thumb_src'] : "";
|
64 |
$this->config['tools']['thumbnail']['resize'] = (bool) $_POST['thumb_field_resize'];
|
65 |
$this->config['tools']['thumbnail']['lazyload'] = (bool) $_POST['thumb_lazy_load'];
|
@@ -88,7 +88,7 @@ if ( isset($_POST['section']) ) {
|
|
88 |
}
|
89 |
|
90 |
$this->config['tools']['cache']['active'] = (bool) $_POST['cache'];
|
91 |
-
$this->config['tools']['cache']['interval']['time'] = $_POST['cache_interval_time'];
|
92 |
$this->config['tools']['cache']['interval']['value'] = ( isset($_POST['cache_interval_value']) && \WordPressPopularPosts\Helper::is_number($_POST['cache_interval_value']) && $_POST['cache_interval_value'] > 0 ) ? (int) $_POST['cache_interval_value'] : 1;
|
93 |
|
94 |
$this->config['tools']['sampling']['active'] = (bool) $_POST['sampling'];
|
58 |
$this->flush_transients();
|
59 |
}
|
60 |
|
61 |
+
$this->config['tools']['thumbnail']['source'] = sanitize_text_field($_POST['thumb_source']);
|
62 |
+
$this->config['tools']['thumbnail']['field'] = ( ! empty($_POST['thumb_field']) ) ? sanitize_text_field($_POST['thumb_field']) : "wpp_thumbnail";
|
63 |
$this->config['tools']['thumbnail']['default'] = ( ! empty($_POST['upload_thumb_src']) ) ? $_POST['upload_thumb_src'] : "";
|
64 |
$this->config['tools']['thumbnail']['resize'] = (bool) $_POST['thumb_field_resize'];
|
65 |
$this->config['tools']['thumbnail']['lazyload'] = (bool) $_POST['thumb_lazy_load'];
|
88 |
}
|
89 |
|
90 |
$this->config['tools']['cache']['active'] = (bool) $_POST['cache'];
|
91 |
+
$this->config['tools']['cache']['interval']['time'] = $_POST['cache_interval_time']; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
92 |
$this->config['tools']['cache']['interval']['value'] = ( isset($_POST['cache_interval_value']) && \WordPressPopularPosts\Helper::is_number($_POST['cache_interval_value']) && $_POST['cache_interval_value'] > 0 ) ? (int) $_POST['cache_interval_value'] : 1;
|
93 |
|
94 |
$this->config['tools']['sampling']['active'] = (bool) $_POST['sampling'];
|
src/Admin/screen-stats.php
CHANGED
@@ -45,7 +45,7 @@ if ( 'stats' == $current ) {
|
|
45 |
</ul>
|
46 |
|
47 |
<div class="wpp-lightbox-tab-content wpp-lightbox-tab-content-active" id="custom-time-range">
|
48 |
-
<input type="text" id="stats_range_time_quantity" name="stats_range_time_quantity" value="<?php echo $this->config['stats']['time_quantity']; ?>">
|
49 |
|
50 |
<select id="stats_range_time_unit" name="stats_range_time_unit">
|
51 |
<option <?php if ($this->config['stats']['time_unit'] == "minute") { ?>selected="selected"<?php } ?> value="minute"><?php _e("Minute(s)", 'wordpress-popular-posts'); ?></option>
|
@@ -71,8 +71,8 @@ if ( 'stats' == $current ) {
|
|
71 |
</div>
|
72 |
|
73 |
<div id="wpp-chart-wrapper">
|
74 |
-
<h4><?php echo $chart_data['totals']['label_summary']; ?></h4>
|
75 |
-
<h5><?php echo $chart_data['totals']['label_date_range']; ?></h5>
|
76 |
|
77 |
<ul class="wpp-header-nav" id="wpp-time-ranges">
|
78 |
<li <?php echo ('daily' == $this->config['stats']['range'] || 'today' == $this->config['stats']['range'] ) ? ' class="current"' : ''; ?>><a href="#" data-range="today" title="<?php esc_attr_e('Today', 'wordpress-popular-posts'); ?>"><?php _e('Today', 'wordpress-popular-posts'); ?></a></li>
|
45 |
</ul>
|
46 |
|
47 |
<div class="wpp-lightbox-tab-content wpp-lightbox-tab-content-active" id="custom-time-range">
|
48 |
+
<input type="text" id="stats_range_time_quantity" name="stats_range_time_quantity" value="<?php echo esc_attr($this->config['stats']['time_quantity']); ?>">
|
49 |
|
50 |
<select id="stats_range_time_unit" name="stats_range_time_unit">
|
51 |
<option <?php if ($this->config['stats']['time_unit'] == "minute") { ?>selected="selected"<?php } ?> value="minute"><?php _e("Minute(s)", 'wordpress-popular-posts'); ?></option>
|
71 |
</div>
|
72 |
|
73 |
<div id="wpp-chart-wrapper">
|
74 |
+
<h4><?php echo wp_kses_post($chart_data['totals']['label_summary']); ?></h4>
|
75 |
+
<h5><?php echo esc_html($chart_data['totals']['label_date_range']); ?></h5>
|
76 |
|
77 |
<ul class="wpp-header-nav" id="wpp-time-ranges">
|
78 |
<li <?php echo ('daily' == $this->config['stats']['range'] || 'today' == $this->config['stats']['range'] ) ? ' class="current"' : ''; ?>><a href="#" data-range="today" title="<?php esc_attr_e('Today', 'wordpress-popular-posts'); ?>"><?php _e('Today', 'wordpress-popular-posts'); ?></a></li>
|
src/Output.php
CHANGED
@@ -544,6 +544,9 @@ class Output {
|
|
544 |
// remove style/script tags
|
545 |
$excerpt = preg_replace('@<(script|style)[^>]*?>.*?</\\1>@si', '', $excerpt);
|
546 |
|
|
|
|
|
|
|
547 |
// remove HTML tags if requested
|
548 |
if ( $this->public_options['post-excerpt']['keep_format'] ) {
|
549 |
$excerpt = wp_kses(
|
544 |
// remove style/script tags
|
545 |
$excerpt = preg_replace('@<(script|style)[^>]*?>.*?</\\1>@si', '', $excerpt);
|
546 |
|
547 |
+
// remove blocks that are not appropriate for the excerpt
|
548 |
+
$excerpt = excerpt_remove_blocks($excerpt);
|
549 |
+
|
550 |
// remove HTML tags if requested
|
551 |
if ( $this->public_options['post-excerpt']['keep_format'] ) {
|
552 |
$excerpt = wp_kses(
|
src/Widget/form.php
CHANGED
@@ -5,13 +5,13 @@ $current_sidebar = $current_sidebar_data ? $current_sidebar_data['id'] : null;
|
|
5 |
<!-- Widget title -->
|
6 |
<p>
|
7 |
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'wordpress-popular-posts'); ?>:</label> <small>[<a href="https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#what-does-title-do" title="<?php _e('What is this?', 'wordpress-popular-posts'); ?>" target="_blank">?</a>]</small> <br />
|
8 |
-
<input type="text" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $instance['title']; ?>" class="widefat" />
|
9 |
</p>
|
10 |
|
11 |
<!-- Limit -->
|
12 |
<p>
|
13 |
<label for="<?php echo $this->get_field_id('limit'); ?>"><?php _e('Show up to', 'wordpress-popular-posts'); ?>:</label><br />
|
14 |
-
<input type="text" id="<?php echo $this->get_field_id('limit'); ?>" name="<?php echo $this->get_field_name('limit'); ?>" value="<?php echo $instance['limit']; ?>" class="widefat" style="width:50px!important" /> <?php _e('posts', 'wordpress-popular-posts'); ?>
|
15 |
</p>
|
16 |
|
17 |
<!-- Order by -->
|
@@ -39,7 +39,7 @@ $current_sidebar = $current_sidebar_data ? $current_sidebar_data['id'] : null;
|
|
39 |
</select><br />
|
40 |
|
41 |
<div style="display: <?php echo ('custom' == $instance['range'] ) ? "block" : "none"; ?>">
|
42 |
-
<input type="text" id="<?php echo $this->get_field_id('time_quantity'); ?>" name="<?php echo $this->get_field_name('time_quantity'); ?>" value="<?php echo $instance['time_quantity']; ?>" style="display: inline; float: left; width: 50px!important;" />
|
43 |
|
44 |
<select id="<?php echo $this->get_field_id('time_unit'); ?>" name="<?php echo $this->get_field_name('time_unit'); ?>" style="margin-bottom: 5px;">
|
45 |
<option <?php if ($instance['time_unit'] == "minute") {?>selected="selected"<?php } ?> value="minute"><?php _e("Minute(s)", 'wordpress-popular-posts'); ?></option>
|
@@ -55,7 +55,7 @@ $current_sidebar = $current_sidebar_data ? $current_sidebar_data['id'] : null;
|
|
55 |
<input type="text" id="<?php echo $this->get_field_id('post_type'); ?>" name="<?php echo $this->get_field_name('post_type'); ?>" value="<?php echo esc_attr($instance['post_type']); ?>" class="widefat" /><br /><br />
|
56 |
|
57 |
<label for="<?php echo $this->get_field_id('pid'); ?>"><?php _e('Post ID(s) to exclude', 'wordpress-popular-posts'); ?>:</label>
|
58 |
-
<input type="text" id="<?php echo $this->get_field_id('pid'); ?>" name="<?php echo $this->get_field_name('pid'); ?>" value="<?php echo $instance['pid']; ?>" class="widefat" /><br /><br />
|
59 |
|
60 |
<label for="<?php echo $this->get_field_id('tax_id'); ?>"><?php _e('Taxonomy', 'wordpress-popular-posts'); ?>:</label> <small>[<a href="https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#what-is-taxonomy-for" title="<?php _e('What is this?', 'wordpress-popular-posts'); ?>" target="_blank">?</a>]</small><br style="margin-bottom: 0.5rem" />
|
61 |
<?php
|
@@ -204,10 +204,10 @@ if ( $taxonomies ) {
|
|
204 |
}
|
205 |
?>
|
206 |
<p style="font-size:11px"><label for="<?php echo $this->get_field_id('title-start'); ?>"><?php _e('Before / after title', 'wordpress-popular-posts'); ?>:</label> <br />
|
207 |
-
<input type="text" id="<?php echo $this->get_field_id('title-start'); ?>" name="<?php echo $this->get_field_name('title-start'); ?>" value="<?php echo $wpp_title_start; ?>" class="widefat" style="width:49%!important" /> <input type="text" id="<?php echo $this->get_field_id('title-end'); ?>" name="<?php echo $this->get_field_name('title-end'); ?>" value="<?php echo $wpp_title_end; ?>" class="widefat" style="width:49%!important" /></p>
|
208 |
|
209 |
<p style="font-size:11px"><label for="<?php echo $this->get_field_id('wpp-start'); ?>"><?php _e('Before / after Popular Posts', 'wordpress-popular-posts'); ?>:</label> <br />
|
210 |
-
<input type="text" id="<?php echo $this->get_field_id('wpp-start'); ?>" name="<?php echo $this->get_field_name('wpp-start'); ?>" value="<?php echo esc_attr($instance['markup']['wpp-start']); ?>" class="widefat" style="width:49%!important" /> <input type="text" id="<?php echo $this->get_field_id('wpp-end'); ?>" name="<?php echo $this->get_field_name('wpp-end'); ?>" value="<?php echo $instance['markup']['wpp-end']; ?>" class="widefat" style="width:49%!important" /></p>
|
211 |
|
212 |
<p style="font-size:11px"><label for="<?php echo $this->get_field_id('post-html'); ?>"><?php _e('Post HTML Markup', 'wordpress-popular-posts'); ?>:</label> <br />
|
213 |
<textarea class="widefat" rows="10" id="<?php echo $this->get_field_id('post-html'); ?>" name="<?php echo $this->get_field_name('post-html'); ?>"><?php echo $instance['markup']['post-html']; ?></textarea>
|
5 |
<!-- Widget title -->
|
6 |
<p>
|
7 |
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'wordpress-popular-posts'); ?>:</label> <small>[<a href="https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#what-does-title-do" title="<?php _e('What is this?', 'wordpress-popular-posts'); ?>" target="_blank">?</a>]</small> <br />
|
8 |
+
<input type="text" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr($instance['title']); ?>" class="widefat" />
|
9 |
</p>
|
10 |
|
11 |
<!-- Limit -->
|
12 |
<p>
|
13 |
<label for="<?php echo $this->get_field_id('limit'); ?>"><?php _e('Show up to', 'wordpress-popular-posts'); ?>:</label><br />
|
14 |
+
<input type="text" id="<?php echo $this->get_field_id('limit'); ?>" name="<?php echo $this->get_field_name('limit'); ?>" value="<?php echo esc_attr($instance['limit']); ?>" class="widefat" style="width:50px!important" /> <?php _e('posts', 'wordpress-popular-posts'); ?>
|
15 |
</p>
|
16 |
|
17 |
<!-- Order by -->
|
39 |
</select><br />
|
40 |
|
41 |
<div style="display: <?php echo ('custom' == $instance['range'] ) ? "block" : "none"; ?>">
|
42 |
+
<input type="text" id="<?php echo $this->get_field_id('time_quantity'); ?>" name="<?php echo $this->get_field_name('time_quantity'); ?>" value="<?php echo esc_attr($instance['time_quantity']); ?>" style="display: inline; float: left; width: 50px!important;" />
|
43 |
|
44 |
<select id="<?php echo $this->get_field_id('time_unit'); ?>" name="<?php echo $this->get_field_name('time_unit'); ?>" style="margin-bottom: 5px;">
|
45 |
<option <?php if ($instance['time_unit'] == "minute") {?>selected="selected"<?php } ?> value="minute"><?php _e("Minute(s)", 'wordpress-popular-posts'); ?></option>
|
55 |
<input type="text" id="<?php echo $this->get_field_id('post_type'); ?>" name="<?php echo $this->get_field_name('post_type'); ?>" value="<?php echo esc_attr($instance['post_type']); ?>" class="widefat" /><br /><br />
|
56 |
|
57 |
<label for="<?php echo $this->get_field_id('pid'); ?>"><?php _e('Post ID(s) to exclude', 'wordpress-popular-posts'); ?>:</label>
|
58 |
+
<input type="text" id="<?php echo $this->get_field_id('pid'); ?>" name="<?php echo $this->get_field_name('pid'); ?>" value="<?php echo esc_attr($instance['pid']); ?>" class="widefat" /><br /><br />
|
59 |
|
60 |
<label for="<?php echo $this->get_field_id('tax_id'); ?>"><?php _e('Taxonomy', 'wordpress-popular-posts'); ?>:</label> <small>[<a href="https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#what-is-taxonomy-for" title="<?php _e('What is this?', 'wordpress-popular-posts'); ?>" target="_blank">?</a>]</small><br style="margin-bottom: 0.5rem" />
|
61 |
<?php
|
204 |
}
|
205 |
?>
|
206 |
<p style="font-size:11px"><label for="<?php echo $this->get_field_id('title-start'); ?>"><?php _e('Before / after title', 'wordpress-popular-posts'); ?>:</label> <br />
|
207 |
+
<input type="text" id="<?php echo $this->get_field_id('title-start'); ?>" name="<?php echo $this->get_field_name('title-start'); ?>" value="<?php echo esc_attr($wpp_title_start); ?>" class="widefat" style="width:49%!important" /> <input type="text" id="<?php echo $this->get_field_id('title-end'); ?>" name="<?php echo $this->get_field_name('title-end'); ?>" value="<?php echo esc_attr($wpp_title_end); ?>" class="widefat" style="width:49%!important" /></p>
|
208 |
|
209 |
<p style="font-size:11px"><label for="<?php echo $this->get_field_id('wpp-start'); ?>"><?php _e('Before / after Popular Posts', 'wordpress-popular-posts'); ?>:</label> <br />
|
210 |
+
<input type="text" id="<?php echo $this->get_field_id('wpp-start'); ?>" name="<?php echo $this->get_field_name('wpp-start'); ?>" value="<?php echo esc_attr($instance['markup']['wpp-start']); ?>" class="widefat" style="width:49%!important" /> <input type="text" id="<?php echo $this->get_field_id('wpp-end'); ?>" name="<?php echo $this->get_field_name('wpp-end'); ?>" value="<?php echo esc_attr($instance['markup']['wpp-end']); ?>" class="widefat" style="width:49%!important" /></p>
|
211 |
|
212 |
<p style="font-size:11px"><label for="<?php echo $this->get_field_id('post-html'); ?>"><?php _e('Post HTML Markup', 'wordpress-popular-posts'); ?>:</label> <br />
|
213 |
<textarea class="widefat" rows="10" id="<?php echo $this->get_field_id('post-html'); ?>" name="<?php echo $this->get_field_name('post-html'); ?>"><?php echo $instance['markup']['post-html']; ?></textarea>
|
wordpress-popular-posts.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* Plugin Name: WordPress Popular Posts
|
17 |
* Plugin URI: https://wordpress.org/plugins/wordpress-popular-posts/
|
18 |
* Description: A highly customizable widget that displays the most popular posts on your blog.
|
19 |
-
* Version: 6.0.
|
20 |
* Requires at least: 5.3
|
21 |
* Requires PHP: 7.2
|
22 |
* Author: Hector Cabrera
|
@@ -31,7 +31,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
31 |
die();
|
32 |
}
|
33 |
|
34 |
-
define('WPP_VERSION', '6.0.
|
35 |
|
36 |
$wpp_main_plugin_file = __FILE__;
|
37 |
// Load plugin bootstrap
|
16 |
* Plugin Name: WordPress Popular Posts
|
17 |
* Plugin URI: https://wordpress.org/plugins/wordpress-popular-posts/
|
18 |
* Description: A highly customizable widget that displays the most popular posts on your blog.
|
19 |
+
* Version: 6.0.3
|
20 |
* Requires at least: 5.3
|
21 |
* Requires PHP: 7.2
|
22 |
* Author: Hector Cabrera
|
31 |
die();
|
32 |
}
|
33 |
|
34 |
+
define('WPP_VERSION', '6.0.3');
|
35 |
|
36 |
$wpp_main_plugin_file = __FILE__;
|
37 |
// Load plugin bootstrap
|