WordPress Popular Posts - Version 5.0.1

Version Description

If you're using a caching plugin, flushing its cache right after installing / upgrading to this version is recommended.

  • Fixed a compatibility issue with the newly introduced widget themes feature. If you're using a theme with your popular posts widget you'll need to reapply it for it to get the latest changes (go to Appearance > Widgets > WordPress Popular Posts, select a different theme then hit Save, finally switch back to your preferred theme and hit Save again.)
  • Fixed two date related issues.
  • Minor styling improvements to widget themes Cards, Cards Compact, Cardview and Cardview Compact.
  • Removes bold styling from post title on the stock design (wpp.css).
  • Improves data caching logic.
Download this release

Release Info

Developer hcabrera
Plugin Icon 128x128 WordPress Popular Posts
Version 5.0.1
Comparing to
See all releases

Code changes from version 5.0.0 to 5.0.1

assets/css/wpp.css CHANGED
@@ -40,7 +40,6 @@ Use the following classes to style your popular posts list as you like.
40
 
41
  /* Title styles */
42
  .wpp-post-title {
43
- font-weight: bold;
44
  }
45
 
46
  /* Excerpt styles */
40
 
41
  /* Title styles */
42
  .wpp-post-title {
 
43
  }
44
 
45
  /* Excerpt styles */
assets/themes/cards-compact/config.json CHANGED
@@ -42,7 +42,7 @@
42
  }
43
  },
44
  "markup": {
45
- "wpp-start": "<ul class=\"wpp-list\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li>{thumb_img}<div class=\"wpp-item-data\">{taxonomy} {title}</div></li>"
48
  }
42
  }
43
  },
44
  "markup": {
45
+ "wpp-start": "<ul class=\"wpp-list wpp-cards-compact\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li>{thumb_img}<div class=\"wpp-item-data\">{taxonomy} {title}</div></li>"
48
  }
assets/themes/cards-compact/style.css CHANGED
@@ -1,10 +1,10 @@
1
- .wpp-list {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
- .wpp-list li {
8
  display: flex;
9
  align-items: center;
10
  list-style: none;
@@ -13,13 +13,14 @@
13
  border-bottom: #ddd 1px solid;
14
  }
15
 
16
- .wpp-list li:last-of-type {
 
17
  margin: 0;
18
  padding: 0;
19
  border-bottom: none;
20
  }
21
 
22
- .wpp-list li .wpp-thumbnail {
23
  overflow: hidden;
24
  display: inline-block;
25
  flex-grow: 0;
@@ -31,33 +32,33 @@
31
  border: none;
32
  }
33
 
34
- .wpp-list li a {
35
  text-decoration: none;
36
  }
37
 
38
- .wpp-list li a:hover {
39
  text-decoration: underline;
40
  }
41
 
42
- .wpp-list li .category,
43
- .wpp-list li .wpp-post-title {
44
  display: block;
45
  font-weight: bold;
46
  }
47
 
48
- .wpp-list li .category {
49
  margin-bottom: 0.25rem;
50
  font-size: 0.7rem;
51
  line-height: 1;
52
  }
53
 
54
- .wpp-list li .wpp-post-title {
55
  margin-bottom: 0.5rem;
56
  font-size: 1.2rem;
57
  line-height: 1.2;
58
  }
59
 
60
- .wpp-list li .wpp-excerpt {
61
  margin: 0;
62
  font-size: 0.8rem;
63
  }
1
+ .wpp-cards-compact {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
+ .wpp-cards-compact li {
8
  display: flex;
9
  align-items: center;
10
  list-style: none;
13
  border-bottom: #ddd 1px solid;
14
  }
15
 
16
+ .wpp-cards-compact li:last-of-type,
17
+ .wpp-cards-compact li:only-child {
18
  margin: 0;
19
  padding: 0;
20
  border-bottom: none;
21
  }
22
 
23
+ .wpp-cards-compact li .wpp-thumbnail {
24
  overflow: hidden;
25
  display: inline-block;
26
  flex-grow: 0;
32
  border: none;
33
  }
34
 
35
+ .wpp-cards-compact li a {
36
  text-decoration: none;
37
  }
38
 
39
+ .wpp-cards-compact li a:hover {
40
  text-decoration: underline;
41
  }
42
 
43
+ .wpp-cards-compact li .category,
44
+ .wpp-cards-compact li .wpp-post-title {
45
  display: block;
46
  font-weight: bold;
47
  }
48
 
49
+ .wpp-cards-compact li .category {
50
  margin-bottom: 0.25rem;
51
  font-size: 0.7rem;
52
  line-height: 1;
53
  }
54
 
55
+ .wpp-cards-compact li .wpp-post-title {
56
  margin-bottom: 0.5rem;
57
  font-size: 1.2rem;
58
  line-height: 1.2;
59
  }
60
 
61
+ .wpp-cards-compact li .wpp-excerpt {
62
  margin: 0;
63
  font-size: 0.8rem;
64
  }
assets/themes/cards/config.json CHANGED
@@ -42,7 +42,7 @@
42
  }
43
  },
44
  "markup": {
45
- "wpp-start": "<ul class=\"wpp-list\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li>{thumb_img} <div class=\"wpp-item-data\">{taxonomy} {title} <p class=\"wpp-excerpt\">{excerpt}</p></div></li>"
48
  }
42
  }
43
  },
44
  "markup": {
45
+ "wpp-start": "<ul class=\"wpp-list wpp-cards\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li>{thumb_img} <div class=\"wpp-item-data\">{taxonomy} {title} <p class=\"wpp-excerpt\">{excerpt}</p></div></li>"
48
  }
assets/themes/cards/style.css CHANGED
@@ -1,10 +1,10 @@
1
- .wpp-list {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
- .wpp-list li {
8
  display: flex;
9
  list-style: none;
10
  margin: 0 0 1.2rem 0;
@@ -12,13 +12,14 @@
12
  border-bottom: #ddd 1px solid;
13
  }
14
 
15
- .wpp-list li:last-of-type {
 
16
  margin: 0;
17
  padding: 0;
18
  border-bottom: none;
19
  }
20
 
21
- .wpp-list li .wpp-thumbnail {
22
  overflow: hidden;
23
  display: inline-block;
24
  flex-grow: 0;
@@ -30,33 +31,33 @@
30
  border: none;
31
  }
32
 
33
- .wpp-list li a {
34
  text-decoration: none;
35
  }
36
 
37
- .wpp-list li a:hover {
38
  text-decoration: underline;
39
  }
40
 
41
- .wpp-list li .category,
42
- .wpp-list li .wpp-post-title {
43
  display: block;
44
  font-weight: bold;
45
  }
46
 
47
- .wpp-list li .category {
48
  margin-bottom: 0.25rem;
49
  font-size: 0.7rem;
50
  line-height: 1;
51
  }
52
 
53
- .wpp-list li .wpp-post-title {
54
  margin-bottom: 0.5rem;
55
  font-size: 1.2rem;
56
  line-height: 1.2;
57
  }
58
 
59
- .wpp-list li .wpp-excerpt {
60
  margin: 0;
61
  font-size: 0.8rem;
62
  }
1
+ .wpp-cards {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
+ .wpp-cards li {
8
  display: flex;
9
  list-style: none;
10
  margin: 0 0 1.2rem 0;
12
  border-bottom: #ddd 1px solid;
13
  }
14
 
15
+ .wpp-cards li:last-of-type,
16
+ .wpp-cards li:only-child {
17
  margin: 0;
18
  padding: 0;
19
  border-bottom: none;
20
  }
21
 
22
+ .wpp-cards li .wpp-thumbnail {
23
  overflow: hidden;
24
  display: inline-block;
25
  flex-grow: 0;
31
  border: none;
32
  }
33
 
34
+ .wpp-cards li a {
35
  text-decoration: none;
36
  }
37
 
38
+ .wpp-cards li a:hover {
39
  text-decoration: underline;
40
  }
41
 
42
+ .wpp-cards li .category,
43
+ .wpp-cards li .wpp-post-title {
44
  display: block;
45
  font-weight: bold;
46
  }
47
 
48
+ .wpp-cards li .category {
49
  margin-bottom: 0.25rem;
50
  font-size: 0.7rem;
51
  line-height: 1;
52
  }
53
 
54
+ .wpp-cards li .wpp-post-title {
55
  margin-bottom: 0.5rem;
56
  font-size: 1.2rem;
57
  line-height: 1.2;
58
  }
59
 
60
+ .wpp-cards li .wpp-excerpt {
61
  margin: 0;
62
  font-size: 0.8rem;
63
  }
assets/themes/cardview-compact/config.json CHANGED
@@ -42,7 +42,7 @@
42
  }
43
  },
44
  "markup": {
45
- "wpp-start": "<ul class=\"wpp-list\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li><div class=\"wpp-thumbnail-container\">{thumb} {taxonomy}</div> <div class=\"wpp-item-data\">{title}</div></li>"
48
  }
42
  }
43
  },
44
  "markup": {
45
+ "wpp-start": "<ul class=\"wpp-list wpp-cardview-compact\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li><div class=\"wpp-thumbnail-container\">{thumb} {taxonomy}</div> <div class=\"wpp-item-data\">{title}</div></li>"
48
  }
assets/themes/cardview-compact/style.css CHANGED
@@ -1,28 +1,29 @@
1
- .wpp-list {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
- .wpp-list li {
8
  list-style: none;
9
  margin: 0 0 1.2rem 0;
10
  padding: 0 0 1rem 0;
11
  border-bottom: #ddd 1px solid;
12
  }
13
 
14
- .wpp-list li:last-of-type {
 
15
  margin: 0;
16
  padding: 0;
17
  border-bottom: none;
18
  }
19
 
20
- .wpp-thumbnail-container {
21
  position: relative;
22
  margin-bottom: .8rem;
23
  }
24
 
25
- .wpp-list li .wpp-thumbnail {
26
  overflow: hidden;
27
  display: block;
28
  margin: 0;
@@ -34,21 +35,21 @@
34
  border: none;
35
  }
36
 
37
- .wpp-list li a {
38
  text-decoration: none;
39
  }
40
 
41
- .wpp-list li a:hover {
42
  text-decoration: underline;
43
  }
44
 
45
- .wpp-list li .category,
46
- .wpp-list li .wpp-post-title {
47
  display: block;
48
  font-weight: bold;
49
  }
50
 
51
- .wpp-list li .category {
52
  position: absolute;
53
  bottom: 0;
54
  left: 0;
@@ -59,18 +60,18 @@
59
  background: rgba(0, 0, 0, 0.5);
60
  }
61
 
62
- .wpp-list li .category:hover {
63
  color: #fff;
64
  background: rgba(0, 0, 0, 0.8);
65
  }
66
 
67
- .wpp-list li .wpp-post-title {
68
  margin: 0 0 0.5rem;
69
  font-size: 1.2rem;
70
  line-height: 1.2;
71
  }
72
 
73
- .wpp-list li .wpp-excerpt {
74
  margin: 0;
75
  font-size: 0.8rem;
76
  }
1
+ .wpp-cardview-compact {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
+ .wpp-cardview-compact li {
8
  list-style: none;
9
  margin: 0 0 1.2rem 0;
10
  padding: 0 0 1rem 0;
11
  border-bottom: #ddd 1px solid;
12
  }
13
 
14
+ .wpp-cardview-compact li:last-of-type,
15
+ .wpp-cardview-compact li:only-child {
16
  margin: 0;
17
  padding: 0;
18
  border-bottom: none;
19
  }
20
 
21
+ .wpp-cardview-compact .wpp-thumbnail-container {
22
  position: relative;
23
  margin-bottom: .8rem;
24
  }
25
 
26
+ .wpp-cardview-compact li .wpp-thumbnail {
27
  overflow: hidden;
28
  display: block;
29
  margin: 0;
35
  border: none;
36
  }
37
 
38
+ .wpp-cardview-compact li a {
39
  text-decoration: none;
40
  }
41
 
42
+ .wpp-cardview-compact li a:hover {
43
  text-decoration: underline;
44
  }
45
 
46
+ .wpp-cardview-compact li .category,
47
+ .wpp-cardview-compact li .wpp-post-title {
48
  display: block;
49
  font-weight: bold;
50
  }
51
 
52
+ .wpp-cardview-compact li .category {
53
  position: absolute;
54
  bottom: 0;
55
  left: 0;
60
  background: rgba(0, 0, 0, 0.5);
61
  }
62
 
63
+ .wpp-cardview-compact li .category:hover {
64
  color: #fff;
65
  background: rgba(0, 0, 0, 0.8);
66
  }
67
 
68
+ .wpp-cardview-compact li .wpp-post-title {
69
  margin: 0 0 0.5rem;
70
  font-size: 1.2rem;
71
  line-height: 1.2;
72
  }
73
 
74
+ .wpp-cardview-compact li .wpp-excerpt {
75
  margin: 0;
76
  font-size: 0.8rem;
77
  }
assets/themes/cardview/config.json CHANGED
@@ -42,7 +42,7 @@
42
  }
43
  },
44
  "markup": {
45
- "wpp-start": "<ul class=\"wpp-list\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li><div class=\"wpp-thumbnail-container\">{thumb} {taxonomy}</div> <div class=\"wpp-item-data\">{title} <p class=\"wpp-excerpt\">{excerpt}</p></div></li>"
48
  }
42
  }
43
  },
44
  "markup": {
45
+ "wpp-start": "<ul class=\"wpp-list wpp-cardview\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li><div class=\"wpp-thumbnail-container\">{thumb} {taxonomy}</div> <div class=\"wpp-item-data\">{title} <p class=\"wpp-excerpt\">{excerpt}</p></div></li>"
48
  }
assets/themes/cardview/style.css CHANGED
@@ -1,28 +1,29 @@
1
- .wpp-list {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
- .wpp-list li {
8
  list-style: none;
9
  margin: 0 0 1.2rem 0;
10
  padding: 0 0 1rem 0;
11
  border-bottom: #ddd 1px solid;
12
  }
13
 
14
- .wpp-list li:last-of-type {
 
15
  margin: 0;
16
  padding: 0;
17
  border-bottom: none;
18
  }
19
 
20
- .wpp-thumbnail-container {
21
  position: relative;
22
  margin-bottom: .8rem;
23
  }
24
 
25
- .wpp-list li .wpp-thumbnail {
26
  overflow: hidden;
27
  display: block;
28
  margin: 0;
@@ -34,21 +35,21 @@
34
  border: none;
35
  }
36
 
37
- .wpp-list li a {
38
  text-decoration: none;
39
  }
40
 
41
- .wpp-list li a:hover {
42
  text-decoration: underline;
43
  }
44
 
45
- .wpp-list li .category,
46
- .wpp-list li .wpp-post-title {
47
  display: block;
48
  font-weight: bold;
49
  }
50
 
51
- .wpp-list li .category {
52
  position: absolute;
53
  bottom: 0;
54
  left: 0;
@@ -59,18 +60,18 @@
59
  background: rgba(0, 0, 0, 0.5);
60
  }
61
 
62
- .wpp-list li .category:hover {
63
  color: #fff;
64
  background: rgba(0, 0, 0, 0.8);
65
  }
66
 
67
- .wpp-list li .wpp-post-title {
68
  margin: 0 0 0.5rem;
69
  font-size: 1.2rem;
70
  line-height: 1.2;
71
  }
72
 
73
- .wpp-list li .wpp-excerpt {
74
  margin: 0;
75
  font-size: 0.8rem;
76
  }
1
+ .wpp-cardview {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
+ .wpp-cardview li {
8
  list-style: none;
9
  margin: 0 0 1.2rem 0;
10
  padding: 0 0 1rem 0;
11
  border-bottom: #ddd 1px solid;
12
  }
13
 
14
+ .wpp-cardview li:last-of-type,
15
+ .wpp-cardview li:only-child {
16
  margin: 0;
17
  padding: 0;
18
  border-bottom: none;
19
  }
20
 
21
+ .wpp-cardview .wpp-thumbnail-container {
22
  position: relative;
23
  margin-bottom: .8rem;
24
  }
25
 
26
+ .wpp-cardview li .wpp-thumbnail {
27
  overflow: hidden;
28
  display: block;
29
  margin: 0;
35
  border: none;
36
  }
37
 
38
+ .wpp-cardview li a {
39
  text-decoration: none;
40
  }
41
 
42
+ .wpp-cardview li a:hover {
43
  text-decoration: underline;
44
  }
45
 
46
+ .wpp-cardview li .category,
47
+ .wpp-cardview li .wpp-post-title {
48
  display: block;
49
  font-weight: bold;
50
  }
51
 
52
+ .wpp-cardview li .category {
53
  position: absolute;
54
  bottom: 0;
55
  left: 0;
60
  background: rgba(0, 0, 0, 0.5);
61
  }
62
 
63
+ .wpp-cardview li .category:hover {
64
  color: #fff;
65
  background: rgba(0, 0, 0, 0.8);
66
  }
67
 
68
+ .wpp-cardview li .wpp-post-title {
69
  margin: 0 0 0.5rem;
70
  font-size: 1.2rem;
71
  line-height: 1.2;
72
  }
73
 
74
+ .wpp-cardview li .wpp-excerpt {
75
  margin: 0;
76
  font-size: 0.8rem;
77
  }
assets/themes/evergreen/config.json CHANGED
@@ -42,7 +42,7 @@
42
  }
43
  },
44
  "markup": {
45
- "wpp-start": "<ul class=\"wpp-list\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
48
  }
42
  }
43
  },
44
  "markup": {
45
+ "wpp-start": "<ul class=\"wpp-list wpp-evergreen\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
48
  }
assets/themes/evergreen/style.css CHANGED
@@ -1,4 +1,4 @@
1
- .wpp-list {
2
  counter-reset: wpp-counter;
3
  margin-left: 0;
4
  margin-right: 0;
@@ -7,7 +7,7 @@
7
  box-sizing: border-box;
8
  }
9
 
10
- .wpp-list li {
11
  position: relative;
12
  display: flex;
13
  align-items: center;
@@ -20,7 +20,7 @@
20
  box-sizing: border-box;
21
  }
22
 
23
- .wpp-list li .item-position::before {
24
  display: inline-block;
25
  flex: 1 0 0;
26
  content: counter(wpp-counter);
@@ -32,18 +32,18 @@
32
  text-align: center;
33
  }
34
 
35
- .wpp-list li .item-data .wpp-post-title {
36
  display: block;
37
  font-size: 15px;
38
  font-weight: 700;
39
  line-height: 1.3;
40
  }
41
 
42
- .wpp-list li .item-data a {
43
  color: #0f470e;
44
  text-decoration: none;
45
  }
46
 
47
- .wpp-list li .item-data a:hover {
48
  text-decoration: underline;
49
  }
1
+ .wpp-evergreen {
2
  counter-reset: wpp-counter;
3
  margin-left: 0;
4
  margin-right: 0;
7
  box-sizing: border-box;
8
  }
9
 
10
+ .wpp-evergreen li {
11
  position: relative;
12
  display: flex;
13
  align-items: center;
20
  box-sizing: border-box;
21
  }
22
 
23
+ .wpp-evergreen li .item-position::before {
24
  display: inline-block;
25
  flex: 1 0 0;
26
  content: counter(wpp-counter);
32
  text-align: center;
33
  }
34
 
35
+ .wpp-evergreen li .item-data .wpp-post-title {
36
  display: block;
37
  font-size: 15px;
38
  font-weight: 700;
39
  line-height: 1.3;
40
  }
41
 
42
+ .wpp-evergreen li .item-data a {
43
  color: #0f470e;
44
  text-decoration: none;
45
  }
46
 
47
+ .wpp-evergreen li .item-data a:hover {
48
  text-decoration: underline;
49
  }
assets/themes/midnight/config.json CHANGED
@@ -42,7 +42,7 @@
42
  }
43
  },
44
  "markup": {
45
- "wpp-start": "<ul class=\"wpp-list\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
48
  }
42
  }
43
  },
44
  "markup": {
45
+ "wpp-start": "<ul class=\"wpp-list wpp-midnight\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
48
  }
assets/themes/midnight/style.css CHANGED
@@ -1,4 +1,4 @@
1
- .wpp-list {
2
  counter-reset: wpp-counter;
3
  margin-left: 0;
4
  margin-right: 0;
@@ -7,7 +7,7 @@
7
  box-sizing: border-box;
8
  }
9
 
10
- .wpp-list li {
11
  position: relative;
12
  display: flex;
13
  align-items: center;
@@ -20,7 +20,7 @@
20
  box-sizing: border-box;
21
  }
22
 
23
- .wpp-list li .item-position::before {
24
  display: inline-block;
25
  flex: 1 0 0;
26
  content: counter(wpp-counter);
@@ -32,18 +32,18 @@
32
  text-align: center;
33
  }
34
 
35
- .wpp-list li .item-data .wpp-post-title {
36
  display: block;
37
  font-size: 15px;
38
  font-weight: 700;
39
  line-height: 1.3;
40
  }
41
 
42
- .wpp-list li .item-data a {
43
  color: #eee;
44
  text-decoration: none;
45
  }
46
 
47
- .wpp-list li .item-data a:hover {
48
  text-decoration: underline;
49
  }
1
+ .wpp-midnight {
2
  counter-reset: wpp-counter;
3
  margin-left: 0;
4
  margin-right: 0;
7
  box-sizing: border-box;
8
  }
9
 
10
+ .wpp-midnight li {
11
  position: relative;
12
  display: flex;
13
  align-items: center;
20
  box-sizing: border-box;
21
  }
22
 
23
+ .wpp-midnight li .item-position::before {
24
  display: inline-block;
25
  flex: 1 0 0;
26
  content: counter(wpp-counter);
32
  text-align: center;
33
  }
34
 
35
+ .wpp-midnight li .item-data .wpp-post-title {
36
  display: block;
37
  font-size: 15px;
38
  font-weight: 700;
39
  line-height: 1.3;
40
  }
41
 
42
+ .wpp-midnight li .item-data a {
43
  color: #eee;
44
  text-decoration: none;
45
  }
46
 
47
+ .wpp-midnight li .item-data a:hover {
48
  text-decoration: underline;
49
  }
assets/themes/sunrise/config.json CHANGED
@@ -42,7 +42,7 @@
42
  }
43
  },
44
  "markup": {
45
- "wpp-start": "<ul class=\"wpp-list\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
48
  }
42
  }
43
  },
44
  "markup": {
45
+ "wpp-start": "<ul class=\"wpp-list wpp-sunrise\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
48
  }
assets/themes/sunrise/style.css CHANGED
@@ -1,4 +1,4 @@
1
- .wpp-list {
2
  counter-reset: wpp-counter;
3
  margin-left: 0;
4
  margin-right: 0;
@@ -7,7 +7,7 @@
7
  box-sizing: border-box;
8
  }
9
 
10
- .wpp-list li {
11
  position: relative;
12
  display: flex;
13
  align-items: center;
@@ -20,7 +20,7 @@
20
  box-sizing: border-box;
21
  }
22
 
23
- .wpp-list li .item-position::before {
24
  display: inline-block;
25
  flex: 1 0 0;
26
  content: counter(wpp-counter);
@@ -32,18 +32,18 @@
32
  text-align: center;
33
  }
34
 
35
- .wpp-list li .item-data .wpp-post-title {
36
  display: block;
37
  font-size: 15px;
38
  font-weight: 700;
39
  line-height: 1.3;
40
  }
41
 
42
- .wpp-list li .item-data a {
43
  color: #2b2b09;
44
  text-decoration: none;
45
  }
46
 
47
- .wpp-list li .item-data a:hover {
48
  text-decoration: underline;
49
  }
1
+ .wpp-sunrise {
2
  counter-reset: wpp-counter;
3
  margin-left: 0;
4
  margin-right: 0;
7
  box-sizing: border-box;
8
  }
9
 
10
+ .wpp-sunrise li {
11
  position: relative;
12
  display: flex;
13
  align-items: center;
20
  box-sizing: border-box;
21
  }
22
 
23
+ .wpp-sunrise li .item-position::before {
24
  display: inline-block;
25
  flex: 1 0 0;
26
  content: counter(wpp-counter);
32
  text-align: center;
33
  }
34
 
35
+ .wpp-sunrise li .item-data .wpp-post-title {
36
  display: block;
37
  font-size: 15px;
38
  font-weight: 700;
39
  line-height: 1.3;
40
  }
41
 
42
+ .wpp-sunrise li .item-data a {
43
  color: #2b2b09;
44
  text-decoration: none;
45
  }
46
 
47
+ .wpp-sunrise li .item-data a:hover {
48
  text-decoration: underline;
49
  }
assets/themes/sunset/config.json CHANGED
@@ -42,7 +42,7 @@
42
  }
43
  },
44
  "markup": {
45
- "wpp-start": "<ul class=\"wpp-list\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
48
  }
42
  }
43
  },
44
  "markup": {
45
+ "wpp-start": "<ul class=\"wpp-list wpp-sunset\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
48
  }
assets/themes/sunset/style.css CHANGED
@@ -1,4 +1,4 @@
1
- .wpp-list {
2
  counter-reset: wpp-counter;
3
  margin-left: 0;
4
  margin-right: 0;
@@ -7,7 +7,7 @@
7
  box-sizing: border-box;
8
  }
9
 
10
- .wpp-list li {
11
  position: relative;
12
  display: flex;
13
  align-items: center;
@@ -20,7 +20,7 @@
20
  box-sizing: border-box;
21
  }
22
 
23
- .wpp-list li .item-position::before {
24
  display: inline-block;
25
  flex: 1 0 0;
26
  content: counter(wpp-counter);
@@ -32,18 +32,18 @@
32
  text-align: center;
33
  }
34
 
35
- .wpp-list li .item-data .wpp-post-title {
36
  display: block;
37
  font-size: 15px;
38
  font-weight: 700;
39
  line-height: 1.3;
40
  }
41
 
42
- .wpp-list li .item-data a {
43
  color: #222;
44
  text-decoration: none;
45
  }
46
 
47
- .wpp-list li .item-data a:hover {
48
  text-decoration: underline;
49
  }
1
+ .wpp-sunset {
2
  counter-reset: wpp-counter;
3
  margin-left: 0;
4
  margin-right: 0;
7
  box-sizing: border-box;
8
  }
9
 
10
+ .wpp-sunset li {
11
  position: relative;
12
  display: flex;
13
  align-items: center;
20
  box-sizing: border-box;
21
  }
22
 
23
+ .wpp-sunset li .item-position::before {
24
  display: inline-block;
25
  flex: 1 0 0;
26
  content: counter(wpp-counter);
32
  text-align: center;
33
  }
34
 
35
+ .wpp-sunset li .item-data .wpp-post-title {
36
  display: block;
37
  font-size: 15px;
38
  font-weight: 700;
39
  line-height: 1.3;
40
  }
41
 
42
+ .wpp-sunset li .item-data a {
43
  color: #222;
44
  text-decoration: none;
45
  }
46
 
47
+ .wpp-sunset li .item-data a:hover {
48
  text-decoration: underline;
49
  }
assets/themes/tiles/config.json CHANGED
@@ -42,7 +42,7 @@
42
  }
43
  },
44
  "markup": {
45
- "wpp-start": "<ul class=\"wpp-list\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li>{thumb}<div class=\"wpp-post-data\">{taxonomy} {title}</div></li>"
48
  }
42
  }
43
  },
44
  "markup": {
45
+ "wpp-start": "<ul class=\"wpp-list wpp-tiles\">",
46
  "wpp-end": "</ul>",
47
  "post-html": "<li>{thumb}<div class=\"wpp-post-data\">{taxonomy} {title}</div></li>"
48
  }
assets/themes/tiles/style.css CHANGED
@@ -1,21 +1,21 @@
1
- .wpp-list {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
- .wpp-list li {
8
  position: relative;
9
  list-style: none;
10
  margin: 0 0 1.2rem 0;
11
  padding: 0;
12
  }
13
 
14
- .wpp-list li:last-of-type {
15
  margin: 0;
16
  }
17
 
18
- .wpp-list li .wpp-thumbnail {
19
  overflow: hidden;
20
  display: block;
21
  margin: 0;
@@ -27,15 +27,15 @@
27
  border: none;
28
  }
29
 
30
- .wpp-list li a {
31
  text-decoration: none;
32
  }
33
 
34
- .wpp-list li a:hover {
35
  text-decoration: underline;
36
  }
37
 
38
- .wpp-list li .wpp-post-data {
39
  position: absolute;
40
  left: 0;
41
  bottom: 0;
@@ -45,19 +45,19 @@
45
  background: rgba(0, 0, 0, 0.5);
46
  }
47
 
48
- .wpp-list li .wpp-post-data .category,
49
- .wpp-list li .wpp-post-data .wpp-post-title {
50
  color: #fff;
51
  font-weight: bold;
52
  }
53
 
54
- .wpp-list li .wpp-post-data .category {
55
  margin: 0;
56
  font-size: 0.7rem;
57
  line-height: 1;
58
  }
59
 
60
- .wpp-list li .wpp-post-data .wpp-post-title {
61
  display: block;
62
  margin: 0 0 0;
63
  font-size: 1rem;
1
+ .wpp-tiles {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
+ .wpp-tiles li {
8
  position: relative;
9
  list-style: none;
10
  margin: 0 0 1.2rem 0;
11
  padding: 0;
12
  }
13
 
14
+ .wpp-tiles li:last-of-type {
15
  margin: 0;
16
  }
17
 
18
+ .wpp-tiles li .wpp-thumbnail {
19
  overflow: hidden;
20
  display: block;
21
  margin: 0;
27
  border: none;
28
  }
29
 
30
+ .wpp-tiles li a {
31
  text-decoration: none;
32
  }
33
 
34
+ .wpp-tiles li a:hover {
35
  text-decoration: underline;
36
  }
37
 
38
+ .wpp-tiles li .wpp-post-data {
39
  position: absolute;
40
  left: 0;
41
  bottom: 0;
45
  background: rgba(0, 0, 0, 0.5);
46
  }
47
 
48
+ .wpp-tiles li .wpp-post-data .category,
49
+ .wpp-tiles li .wpp-post-data .wpp-post-title {
50
  color: #fff;
51
  font-weight: bold;
52
  }
53
 
54
+ .wpp-tiles li .wpp-post-data .category {
55
  margin: 0;
56
  font-size: 0.7rem;
57
  line-height: 1;
58
  }
59
 
60
+ .wpp-tiles li .wpp-post-data .wpp-post-title {
61
  display: block;
62
  margin: 0 0 0;
63
  font-size: 1rem;
assets/themes/tiny/config.json CHANGED
@@ -33,7 +33,7 @@
33
  }
34
  },
35
  "markup": {
36
- "wpp-start": "<ul class=\"wpp-list\">",
37
  "wpp-end": "</ul>",
38
  "post-html": "<li><div class=\"wpp-item-data\">{category}</div> {title}</li>"
39
  }
33
  }
34
  },
35
  "markup": {
36
+ "wpp-start": "<ul class=\"wpp-list wpp-tiny\">",
37
  "wpp-end": "</ul>",
38
  "post-html": "<li><div class=\"wpp-item-data\">{category}</div> {title}</li>"
39
  }
assets/themes/tiny/style.css CHANGED
@@ -1,35 +1,35 @@
1
- .wpp-list {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
- .wpp-list li {
8
  list-style: none;
9
  margin: 0 0 1.2rem 0;
10
  padding: 0;
11
  }
12
 
13
- .wpp-list li:last-of-type {
14
  margin: 0;
15
  }
16
 
17
- .wpp-list li a {
18
  text-decoration: none;
19
  }
20
 
21
- .wpp-list li a:hover {
22
  text-decoration: underline;
23
  }
24
 
25
- .wpp-list li .wpp-post-title {
26
  font-size: 1.125rem;
27
  font-weight: 700;
28
  letter-spacing: -1px;
29
  line-height: 1.1;
30
  }
31
 
32
- .wpp-list li .wpp-item-data {
33
  opacity: 0.5;
34
  font-size: 0.65rem;
35
  text-transform: capitalize;
1
+ .wpp-tiny {
2
  margin-left: 0;
3
  margin-right: 0;
4
  padding: 0;
5
  }
6
 
7
+ .wpp-tiny li {
8
  list-style: none;
9
  margin: 0 0 1.2rem 0;
10
  padding: 0;
11
  }
12
 
13
+ .wpp-tiny li:last-of-type {
14
  margin: 0;
15
  }
16
 
17
+ .wpp-tiny li a {
18
  text-decoration: none;
19
  }
20
 
21
+ .wpp-tiny li a:hover {
22
  text-decoration: underline;
23
  }
24
 
25
+ .wpp-tiny li .wpp-post-title {
26
  font-size: 1.125rem;
27
  font-weight: 700;
28
  letter-spacing: -1px;
29
  line-height: 1.1;
30
  }
31
 
32
+ .wpp-tiny li .wpp-item-data {
33
  opacity: 0.5;
34
  font-size: 0.65rem;
35
  text-transform: capitalize;
i18n/wordpress-popular-posts.pot CHANGED
@@ -5,7 +5,7 @@ msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Popular Posts\n"
7
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wordpress-popular-posts\n"
8
- "POT-Creation-Date: 2019-10-10 15:01-0400\n"
9
  "PO-Revision-Date: 2015-04-24 13:30-0430\n"
10
  "Last-Translator: Héctor Cabrera <hcabrerab@gmail.com>\n"
11
  "Language-Team: Héctor Cabrera <me@cabrerahector.com>\n"
@@ -77,7 +77,7 @@ msgid "Settings"
77
  msgstr ""
78
 
79
  #: ../src/Admin/Admin.php:641 ../src/Admin/Admin.php:1030 ../src/Admin/Admin.php:1034
80
- #: ../src/Output.php:708
81
  #, php-format
82
  msgid "%s view"
83
  msgid_plural "%s views"
@@ -85,7 +85,7 @@ msgstr[0] ""
85
  msgstr[1] ""
86
 
87
  #: ../src/Admin/Admin.php:641 ../src/Admin/Admin.php:1032 ../src/Admin/Admin.php:1034
88
- #: ../src/Output.php:691
89
  #, php-format
90
  msgid "%s comment"
91
  msgid_plural "%s comments"
@@ -891,37 +891,33 @@ msgstr ""
891
  msgid "outputs the position of the post in the listing"
892
  msgstr ""
893
 
894
- #: ../src/Admin/admin-page.php:877
895
- msgid "outputs rel=\"nofollow\" for the current post"
896
- msgstr ""
897
-
898
  #: ../src/Output.php:237
899
  msgid "Sorry. No data so far."
900
  msgstr ""
901
 
902
- #: ../src/Output.php:702
903
  #, php-format
904
  msgid "%s view per day"
905
  msgid_plural "%s views per day"
906
  msgstr[0] ""
907
  msgstr[1] ""
908
 
909
- #: ../src/Output.php:731
910
  #, php-format
911
  msgid "by %s"
912
  msgstr ""
913
 
914
- #: ../src/Output.php:737
915
  #, php-format
916
  msgid "posted %s"
917
  msgstr ""
918
 
919
- #: ../src/Output.php:737
920
  #, php-format
921
  msgid "posted on %s"
922
  msgstr ""
923
 
924
- #: ../src/Output.php:745
925
  #, php-format
926
  msgid "under %s"
927
  msgstr ""
@@ -930,67 +926,67 @@ msgstr ""
930
  msgid "Invalid Widget Instance ID"
931
  msgstr ""
932
 
933
- #: ../src/Rest/Controller.php:434
934
  msgid "Return popular posts from specified custom post type(s)."
935
  msgstr ""
936
 
937
- #: ../src/Rest/Controller.php:441
938
  msgid "The maximum number of popular posts to return."
939
  msgstr ""
940
 
941
- #: ../src/Rest/Controller.php:449
942
  msgid "Retrieve the most popular entries published within the specified time range."
943
  msgstr ""
944
 
945
- #: ../src/Rest/Controller.php:457
946
  msgid "An offset point for the collection."
947
  msgstr ""
948
 
949
- #: ../src/Rest/Controller.php:465
950
  msgid "Set the sorting option of the popular posts."
951
  msgstr ""
952
 
953
- #: ../src/Rest/Controller.php:473
954
  msgid "Return popular posts from a specified time range."
955
  msgstr ""
956
 
957
- #: ../src/Rest/Controller.php:481
958
  msgid "Specifies the time unit of the custom time range."
959
  msgstr ""
960
 
961
- #: ../src/Rest/Controller.php:489
962
  msgid "Specifies the number of time units of the custom time range."
963
  msgstr ""
964
 
965
- #: ../src/Rest/Controller.php:497
966
  msgid "Post IDs to exclude from the listing."
967
  msgstr ""
968
 
969
- #: ../src/Rest/Controller.php:505
970
  msgid "Include posts in a specified taxonomy."
971
  msgstr ""
972
 
973
- #: ../src/Rest/Controller.php:513
974
  msgid "Taxonomy IDs, separated by comma (prefix a minus sign to exclude)."
975
  msgstr ""
976
 
977
- #: ../src/Rest/Controller.php:521
978
  msgid "Include popular posts from author ID(s)."
979
  msgstr ""
980
 
981
- #: ../src/Rest/Controller.php:542
982
  msgid "Security nonce."
983
  msgstr ""
984
 
985
- #: ../src/Rest/Controller.php:548
986
  msgid "The post / page ID."
987
  msgstr ""
988
 
989
- #: ../src/Rest/Controller.php:555
990
  msgid "Enables Data Sampling."
991
  msgstr ""
992
 
993
- #: ../src/Rest/Controller.php:562
994
  msgid "Sets the Sampling Rate."
995
  msgstr ""
996
 
5
  msgstr ""
6
  "Project-Id-Version: WordPress Popular Posts\n"
7
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wordpress-popular-posts\n"
8
+ "POT-Creation-Date: 2019-10-29 11:14-0400\n"
9
  "PO-Revision-Date: 2015-04-24 13:30-0430\n"
10
  "Last-Translator: Héctor Cabrera <hcabrerab@gmail.com>\n"
11
  "Language-Team: Héctor Cabrera <me@cabrerahector.com>\n"
77
  msgstr ""
78
 
79
  #: ../src/Admin/Admin.php:641 ../src/Admin/Admin.php:1030 ../src/Admin/Admin.php:1034
80
+ #: ../src/Output.php:707
81
  #, php-format
82
  msgid "%s view"
83
  msgid_plural "%s views"
85
  msgstr[1] ""
86
 
87
  #: ../src/Admin/Admin.php:641 ../src/Admin/Admin.php:1032 ../src/Admin/Admin.php:1034
88
+ #: ../src/Output.php:690
89
  #, php-format
90
  msgid "%s comment"
91
  msgid_plural "%s comments"
891
  msgid "outputs the position of the post in the listing"
892
  msgstr ""
893
 
 
 
 
 
894
  #: ../src/Output.php:237
895
  msgid "Sorry. No data so far."
896
  msgstr ""
897
 
898
+ #: ../src/Output.php:701
899
  #, php-format
900
  msgid "%s view per day"
901
  msgid_plural "%s views per day"
902
  msgstr[0] ""
903
  msgstr[1] ""
904
 
905
+ #: ../src/Output.php:730
906
  #, php-format
907
  msgid "by %s"
908
  msgstr ""
909
 
910
+ #: ../src/Output.php:736
911
  #, php-format
912
  msgid "posted %s"
913
  msgstr ""
914
 
915
+ #: ../src/Output.php:736
916
  #, php-format
917
  msgid "posted on %s"
918
  msgstr ""
919
 
920
+ #: ../src/Output.php:744
921
  #, php-format
922
  msgid "under %s"
923
  msgstr ""
926
  msgid "Invalid Widget Instance ID"
927
  msgstr ""
928
 
929
+ #: ../src/Rest/Controller.php:440
930
  msgid "Return popular posts from specified custom post type(s)."
931
  msgstr ""
932
 
933
+ #: ../src/Rest/Controller.php:447
934
  msgid "The maximum number of popular posts to return."
935
  msgstr ""
936
 
937
+ #: ../src/Rest/Controller.php:455
938
  msgid "Retrieve the most popular entries published within the specified time range."
939
  msgstr ""
940
 
941
+ #: ../src/Rest/Controller.php:463
942
  msgid "An offset point for the collection."
943
  msgstr ""
944
 
945
+ #: ../src/Rest/Controller.php:471
946
  msgid "Set the sorting option of the popular posts."
947
  msgstr ""
948
 
949
+ #: ../src/Rest/Controller.php:479
950
  msgid "Return popular posts from a specified time range."
951
  msgstr ""
952
 
953
+ #: ../src/Rest/Controller.php:487
954
  msgid "Specifies the time unit of the custom time range."
955
  msgstr ""
956
 
957
+ #: ../src/Rest/Controller.php:495
958
  msgid "Specifies the number of time units of the custom time range."
959
  msgstr ""
960
 
961
+ #: ../src/Rest/Controller.php:503
962
  msgid "Post IDs to exclude from the listing."
963
  msgstr ""
964
 
965
+ #: ../src/Rest/Controller.php:511
966
  msgid "Include posts in a specified taxonomy."
967
  msgstr ""
968
 
969
+ #: ../src/Rest/Controller.php:519
970
  msgid "Taxonomy IDs, separated by comma (prefix a minus sign to exclude)."
971
  msgstr ""
972
 
973
+ #: ../src/Rest/Controller.php:527
974
  msgid "Include popular posts from author ID(s)."
975
  msgstr ""
976
 
977
+ #: ../src/Rest/Controller.php:548
978
  msgid "Security nonce."
979
  msgstr ""
980
 
981
+ #: ../src/Rest/Controller.php:554
982
  msgid "The post / page ID."
983
  msgstr ""
984
 
985
+ #: ../src/Rest/Controller.php:561
986
  msgid "Enables Data Sampling."
987
  msgstr ""
988
 
989
+ #: ../src/Rest/Controller.php:568
990
  msgid "Sets the Sampling Rate."
991
  msgstr ""
992
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: popular, posts, widget, popularity, top
5
  Requires at least: 4.7
6
  Tested up to: 5.3
7
  Requires PHP: 5.4
8
- Stable tag: 5.0.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -89,6 +89,16 @@ The FAQ section has been moved [here](https://github.com/cabrerahector/wordpress
89
  4. Statistics panel.
90
 
91
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
92
  = 5.0.0 =
93
 
94
  **If you're using a caching plugin, flushing its cache right after installing / upgrading to this version is required.**
5
  Requires at least: 4.7
6
  Tested up to: 5.3
7
  Requires PHP: 5.4
8
+ Stable tag: 5.0.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
89
  4. Statistics panel.
90
 
91
  == Changelog ==
92
+ = 5.0.1 =
93
+
94
+ **If you're using a caching plugin, flushing its cache right after installing / upgrading to this version is recommended.**
95
+
96
+ - Fixed a compatibility issue with the newly introduced [widget themes](https://cabrerahector.com/wordpress/wordpress-popular-posts-5-0-multiple-taxonomy-support-themes-thumbnail-lazy-loading-and-more/#themes) feature. If you're using a theme with your popular posts widget you'll need to reapply it for it to get the latest changes (go to Appearance > Widgets > WordPress Popular Posts, select a different theme then hit Save, finally switch back to your preferred theme and hit Save again.)
97
+ - Fixed two date related issues.
98
+ - Minor styling improvements to widget themes Cards, Cards Compact, Cardview and Cardview Compact.
99
+ - Removes bold styling from post title on the stock design (wpp.css).
100
+ - Improves data caching logic.
101
+
102
  = 5.0.0 =
103
 
104
  **If you're using a caching plugin, flushing its cache right after installing / upgrading to this version is required.**
src/Admin/admin-page.php CHANGED
@@ -874,7 +874,7 @@ if ( ! $wpp_rand = get_option("wpp_rand") ) {
874
  <tr>
875
  <td><strong>post_html</strong></td>
876
  <td><?php _e('Sets the HTML structure of each post', 'wordpress-popular-posts'); ?></td>
877
- <td><?php _e('Text string, custom HTML', 'wordpress-popular-posts'); ?>.<br /><br /><strong><?php _e('Available Content Tags', 'wordpress-popular-posts'); ?>:</strong> <br /><br /><em>{thumb}</em> (<?php _e('returns thumbnail linked to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_img}</em> (<?php _e('returns thumbnail image without linking to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_url}</em> (<?php _e('returns thumbnail url, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{title}</em> (<?php _e('returns linked post/page title', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{pid}</em> (<?php _e('returns the post/page ID', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{summary}</em> (<?php _e('returns post/page excerpt, and requires excerpt_length to be greater than 0', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{stats}</em> (<?php _e('returns the default stats tags', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{rating}</em> (<?php _e('returns post/page current rating, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{score}</em> (<?php _e('returns post/page current rating as an integer, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{url}</em> (<?php _e('returns the URL of the post/page', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{text_title}</em> (<?php _e('returns post/page title, no link', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{author}</em> (<?php _e('returns linked author name, requires stats_author=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{category}</em> (<?php _e('returns linked category name, requires stats_category=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{taxonomy}</em> (<?php _e('returns linked taxonomy names, requires stats_taxonomy=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{views}</em> (<?php _e('returns views count only, no text', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{comments}</em> (<?php _e('returns comments count only, no text, requires stats_comments=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{date}</em> (<?php _e('returns post/page date, requires stats_date=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{total_items}</em> (<?php _e('outputs number of popular posts found', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{item_position}</em> (<?php _e('outputs the position of the post in the listing', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{nofollow}</em> (<?php _e('outputs rel="nofollow" for the current post', 'wordpress-popular-posts'); ?>)</td>
878
  <td>&lt;li&gt;{thumb} {title} &lt;span class="wpp-meta post-stats"&gt;{stats}&lt;/span&gt;&lt;/li&gt;</td>
879
  <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular($args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp post_html='&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt;&lt;/li&gt;']<br /><br /></td>
880
  </tr>
874
  <tr>
875
  <td><strong>post_html</strong></td>
876
  <td><?php _e('Sets the HTML structure of each post', 'wordpress-popular-posts'); ?></td>
877
+ <td><?php _e('Text string, custom HTML', 'wordpress-popular-posts'); ?>.<br /><br /><strong><?php _e('Available Content Tags', 'wordpress-popular-posts'); ?>:</strong> <br /><br /><em>{thumb}</em> (<?php _e('returns thumbnail linked to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_img}</em> (<?php _e('returns thumbnail image without linking to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_url}</em> (<?php _e('returns thumbnail url, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{title}</em> (<?php _e('returns linked post/page title', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{pid}</em> (<?php _e('returns the post/page ID', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{summary}</em> (<?php _e('returns post/page excerpt, and requires excerpt_length to be greater than 0', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{stats}</em> (<?php _e('returns the default stats tags', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{rating}</em> (<?php _e('returns post/page current rating, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{score}</em> (<?php _e('returns post/page current rating as an integer, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{url}</em> (<?php _e('returns the URL of the post/page', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{text_title}</em> (<?php _e('returns post/page title, no link', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{author}</em> (<?php _e('returns linked author name, requires stats_author=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{category}</em> (<?php _e('returns linked category name, requires stats_category=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{taxonomy}</em> (<?php _e('returns linked taxonomy names, requires stats_taxonomy=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{views}</em> (<?php _e('returns views count only, no text', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{comments}</em> (<?php _e('returns comments count only, no text, requires stats_comments=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{date}</em> (<?php _e('returns post/page date, requires stats_date=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{total_items}</em> (<?php _e('outputs number of popular posts found', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{item_position}</em> (<?php _e('outputs the position of the post in the listing', 'wordpress-popular-posts'); ?>)</td>
878
  <td>&lt;li&gt;{thumb} {title} &lt;span class="wpp-meta post-stats"&gt;{stats}&lt;/span&gt;&lt;/li&gt;</td>
879
  <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular($args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp post_html='&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt;&lt;/li&gt;']<br /><br /></td>
880
  </tr>
src/Cache.php CHANGED
@@ -53,7 +53,7 @@ class Cache {
53
  return false;
54
 
55
  if (
56
- ! is_int($time_value)
57
  || $time_value <= 0
58
  ) {
59
  $time_value = 1;
53
  return false;
54
 
55
  if (
56
+ false === filter_var($time_value, FILTER_VALIDATE_INT)
57
  || $time_value <= 0
58
  ) {
59
  $time_value = 1;
src/Front/Front.php CHANGED
@@ -403,6 +403,12 @@ class Front {
403
  $time_value = $this->config['tools']['cache']['interval']['value']; // eg. 5
404
  $time_unit = $this->config['tools']['cache']['interval']['time']; // eg. 'minute'
405
 
 
 
 
 
 
 
406
  \WordPressPopularPosts\Cache::set(
407
  $key,
408
  $popular_posts,
403
  $time_value = $this->config['tools']['cache']['interval']['value']; // eg. 5
404
  $time_unit = $this->config['tools']['cache']['interval']['time']; // eg. 'minute'
405
 
406
+ // No popular posts found, check again in 1 minute
407
+ if ( ! $popular_posts->get_posts() ) {
408
+ $time_value = 1;
409
+ $time_unit = 'minute';
410
+ }
411
+
412
  \WordPressPopularPosts\Cache::set(
413
  $key,
414
  $popular_posts,
src/Output.php CHANGED
@@ -534,8 +534,15 @@ class Output {
534
 
535
  if ( $this->public_options['stats_tag']['date']['active'] ) {
536
  // Check locale
537
- if ( $current_language_locale = $this->translate->get_locale($this->translate->get_current_language()) ) {
 
 
 
 
538
  Moment\Moment::setLocale($current_language_locale);
 
 
 
539
  }
540
 
541
  $m = new Moment\Moment('@' . strtotime($post_object->date));
534
 
535
  if ( $this->public_options['stats_tag']['date']['active'] ) {
536
  // Check locale
537
+ if ( ! $current_language_locale = $this->translate->get_locale($this->translate->get_current_language()) ) {
538
+ $current_language_locale = get_locale();
539
+ }
540
+
541
+ try {
542
  Moment\Moment::setLocale($current_language_locale);
543
+ } // Locale not found, fallback to English (US)
544
+ catch( \Exception $e ) {
545
+ Moment\Moment::setLocale('en_US');
546
  }
547
 
548
  $m = new Moment\Moment('@' . strtotime($post_object->date));
src/Rest/Controller.php CHANGED
@@ -355,6 +355,12 @@ class Controller extends \WP_REST_Controller {
355
  $time_value = $this->config['tools']['cache']['interval']['value']; // eg. 5
356
  $time_unit = $this->config['tools']['cache']['interval']['time']; // eg. 'minute'
357
 
 
 
 
 
 
 
358
  \WordPressPopularPosts\Cache::set(
359
  $key,
360
  $popular_posts,
355
  $time_value = $this->config['tools']['cache']['interval']['value']; // eg. 5
356
  $time_unit = $this->config['tools']['cache']['interval']['time']; // eg. 'minute'
357
 
358
+ // No popular posts found, check again in 1 minute
359
+ if ( ! $popular_posts->get_posts() ) {
360
+ $time_value = 1;
361
+ $time_unit = 'minute';
362
+ }
363
+
364
  \WordPressPopularPosts\Cache::set(
365
  $key,
366
  $popular_posts,
src/Widget/Widget.php CHANGED
@@ -446,6 +446,12 @@ class Widget extends \WP_Widget {
446
  $time_value = $this->admin_options['tools']['cache']['interval']['value']; // eg. 5
447
  $time_unit = $this->admin_options['tools']['cache']['interval']['time']; // eg. 'minute'
448
 
 
 
 
 
 
 
449
  \WordPressPopularPosts\Cache::set(
450
  $key,
451
  $popular_posts,
446
  $time_value = $this->admin_options['tools']['cache']['interval']['value']; // eg. 5
447
  $time_unit = $this->admin_options['tools']['cache']['interval']['time']; // eg. 'minute'
448
 
449
+ // No popular posts found, check again in 1 minute
450
+ if ( ! $popular_posts->get_posts() ) {
451
+ $time_value = 1;
452
+ $time_unit = 'minute';
453
+ }
454
+
455
  \WordPressPopularPosts\Cache::set(
456
  $key,
457
  $popular_posts,
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: 5.0.0
20
  * Author: Hector Cabrera
21
  * Author URI: https://cabrerahector.com/
22
  * License: GPL-2.0+
@@ -29,7 +29,7 @@ if ( ! defined( 'WPINC' ) ) {
29
  die();
30
  }
31
 
32
- define('WPP_VERSION', '5.0.0');
33
  define('WPP_MIN_PHP_VERSION', '5.4');
34
  define('WPP_MIN_WP_VERSION', '4.9');
35
 
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: 5.0.1
20
  * Author: Hector Cabrera
21
  * Author URI: https://cabrerahector.com/
22
  * License: GPL-2.0+
29
  die();
30
  }
31
 
32
+ define('WPP_VERSION', '5.0.1');
33
  define('WPP_MIN_PHP_VERSION', '5.4');
34
  define('WPP_MIN_WP_VERSION', '4.9');
35