Contextual Related Posts - Version 3.0.2

Version Description

  • Bug fixes:
    • Fixed issue where Related Posts newer than was set to 0 caused no posts to display
    • Use the original arguments when setting the cache key for CRP_Query
    • Selecting "Blank Output" didn't work
Download this release

Release Info

Developer Ajay
Plugin Icon 128x128 Contextual Related Posts
Version 3.0.2
Comparing to
See all releases

Code changes from version 3.0.1 to 3.0.2

contextual-related-posts.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Contextual Related Posts
16
  * Plugin URI: https://webberzone.com/plugins/contextual-related-posts/
17
  * Description: Display a set of related posts on your website or in your feed. Increase reader retention and reduce bounce rates
18
- * Version: 3.0.1
19
  * Author: WebberZone
20
  * Author URI: https://webberzone.com
21
  * License: GPL-2.0+
15
  * Plugin Name: Contextual Related Posts
16
  * Plugin URI: https://webberzone.com/plugins/contextual-related-posts/
17
  * Description: Display a set of related posts on your website or in your feed. Increase reader retention and reduce bounce rates
18
+ * Version: 3.0.2
19
  * Author: WebberZone
20
  * Author URI: https://webberzone.com
21
  * License: GPL-2.0+
includes/admin/admin.php CHANGED
File without changes
includes/class-crp-query.php CHANGED
@@ -27,6 +27,14 @@ if ( ! class_exists( 'CRP_Query' ) ) :
27
  */
28
  public $source_post;
29
 
 
 
 
 
 
 
 
 
30
  /**
31
  * Query vars, after parsing
32
  *
@@ -150,6 +158,9 @@ if ( ! class_exists( 'CRP_Query' ) ) :
150
  $args['ignore_sticky_posts'] = true;
151
  $args['no_found_rows'] = true;
152
 
 
 
 
153
  // Set the source post.
154
  $source_post = empty( $args['postid'] ) ? $post : get_post( $args['postid'] );
155
  if ( ! $source_post ) {
@@ -278,8 +289,8 @@ if ( ! class_exists( 'CRP_Query' ) ) :
278
  // Set date_query.
279
  $args['date_query'] = array(
280
  array(
281
- 'after' => gmdate( 'Y-m-d', strtotime( current_time( 'mysql' ) ) - ( absint( $args['daily_range'] ) * DAY_IN_SECONDS ) ),
282
- 'before' => current_time( 'Y-m-d' ),
283
  'inclusive' => true,
284
  ),
285
  );
@@ -597,7 +608,7 @@ if ( ! class_exists( 'CRP_Query' ) ) :
597
  // Check the cache if there are any posts saved.
598
  if ( ! empty( $this->query_args['cache_posts'] ) && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
599
 
600
- $meta_key = crp_cache_get_key( $this->request );
601
 
602
  $post_ids = get_crp_cache( $this->source_post->ID, $meta_key );
603
 
@@ -637,7 +648,7 @@ if ( ! class_exists( 'CRP_Query' ) ) :
637
 
638
  // Support caching to speed up retrieval.
639
  if ( ! empty( $this->query_args['cache_posts'] ) && ! $this->in_cache && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
640
- $meta_key = crp_cache_get_key( $this->request );
641
  $post_ids = wp_list_pluck( $query->posts, 'ID' );
642
 
643
  set_crp_cache( $this->source_post->ID, $meta_key, $post_ids );
27
  */
28
  public $source_post;
29
 
30
+ /**
31
+ * Query vars, before parsing
32
+ *
33
+ * @since 3.0.2
34
+ * @var array
35
+ */
36
+ public $input_query_args = array();
37
+
38
  /**
39
  * Query vars, after parsing
40
  *
158
  $args['ignore_sticky_posts'] = true;
159
  $args['no_found_rows'] = true;
160
 
161
+ // Store query args before we manipulate them.
162
+ $this->input_query_args = $args;
163
+
164
  // Set the source post.
165
  $source_post = empty( $args['postid'] ) ? $post : get_post( $args['postid'] );
166
  if ( ! $source_post ) {
289
  // Set date_query.
290
  $args['date_query'] = array(
291
  array(
292
+ 'after' => ( 0 === absint( $args['daily_range'] ) ) ? '' : gmdate( 'Y-m-d', strtotime( current_time( 'mysql' ) ) - ( absint( $args['daily_range'] ) * DAY_IN_SECONDS ) ),
293
+ 'before' => current_time( 'mysql' ),
294
  'inclusive' => true,
295
  ),
296
  );
608
  // Check the cache if there are any posts saved.
609
  if ( ! empty( $this->query_args['cache_posts'] ) && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
610
 
611
+ $meta_key = crp_cache_get_key( $this->input_query_args );
612
 
613
  $post_ids = get_crp_cache( $this->source_post->ID, $meta_key );
614
 
648
 
649
  // Support caching to speed up retrieval.
650
  if ( ! empty( $this->query_args['cache_posts'] ) && ! $this->in_cache && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
651
+ $meta_key = crp_cache_get_key( $this->input_query_args );
652
  $post_ids = wp_list_pluck( $query->posts, 'ID' );
653
 
654
  set_crp_cache( $this->source_post->ID, $meta_key, $post_ids );
includes/main-query.php CHANGED
@@ -194,7 +194,7 @@ function get_crp( $args = array() ) {
194
  $output .= apply_filters( 'crp_clearfix', $clearfix, $args );
195
 
196
  } else {
197
- $output .= ( $args['blank_output'] ) ? ' ' : '<p>' . $args['blank_output_text'] . '</p>';
198
  }// End if.
199
 
200
  if ( $args['show_credit'] ) {
@@ -211,7 +211,7 @@ function get_crp( $args = array() ) {
211
  // Check if the opening list tag is missing in the output, it means all of our results were eliminated cause of the category filter.
212
  if ( ! empty( $args['before_list_item'] ) && false === strpos( $output, $args['before_list_item'] ) ) {
213
  $output = '<div id="crp_related">';
214
- $output .= ( $args['blank_output'] ) ? ' ' : '<p>' . $args['blank_output_text'] . '</p>';
215
  }
216
 
217
  $output .= '</div>'; // Closing div of 'crp_related'.
194
  $output .= apply_filters( 'crp_clearfix', $clearfix, $args );
195
 
196
  } else {
197
+ $output .= ( 'blank' === $args['blank_output'] ) ? ' ' : '<p>' . $args['blank_output_text'] . '</p>';
198
  }// End if.
199
 
200
  if ( $args['show_credit'] ) {
211
  // Check if the opening list tag is missing in the output, it means all of our results were eliminated cause of the category filter.
212
  if ( ! empty( $args['before_list_item'] ) && false === strpos( $output, $args['before_list_item'] ) ) {
213
  $output = '<div id="crp_related">';
214
+ $output .= ( 'blank' === $args['blank_output'] ) ? ' ' : '<p>' . $args['blank_output_text'] . '</p>';
215
  }
216
 
217
  $output .= '</div>'; // Closing div of 'crp_related'.
languages/contextual-related-posts-en_US.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Contextual Related Posts\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2021-01-07 18:05+0000\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Ajay D'Souza\n"
8
  "Language-Team: WebberZone\n"
@@ -45,7 +45,7 @@ msgstr ""
45
 
46
  #: includes/admin/blocks/related-posts/index.js:22
47
  #: includes/admin/blocks/related-posts/index.min.js:1
48
- #: includes/modules/class-crp-widget.php:32
49
  msgid "Related Posts [CRP]"
50
  msgstr ""
51
 
@@ -76,13 +76,13 @@ msgstr ""
76
 
77
  #: includes/admin/blocks/related-posts/index.js:146
78
  #: includes/admin/blocks/related-posts/index.min.js:1
79
- #: includes/modules/class-crp-widget.php:90
80
  msgid "No. of posts"
81
  msgstr ""
82
 
83
  #: includes/admin/blocks/related-posts/index.js:157
84
  #: includes/admin/blocks/related-posts/index.min.js:1
85
- #: includes/modules/class-crp-widget.php:95
86
  msgid "Offset"
87
  msgstr ""
88
 
@@ -105,7 +105,7 @@ msgstr ""
105
 
106
  #: includes/admin/blocks/related-posts/index.js:184
107
  #: includes/admin/blocks/related-posts/index.min.js:1
108
- #: includes/modules/class-crp-widget.php:114
109
  msgid "Thumbnail options"
110
  msgstr ""
111
 
@@ -496,7 +496,7 @@ msgid ""
496
  msgstr ""
497
 
498
  #: includes/admin/default-settings.php:397
499
- #: includes/modules/class-crp-widget.php:132
500
  msgid "Order posts"
501
  msgstr ""
502
 
@@ -531,7 +531,7 @@ msgid ""
531
  msgstr ""
532
 
533
  #: includes/admin/default-settings.php:429
534
- #: includes/modules/class-crp-widget.php:156
535
  msgid "Post types to include"
536
  msgstr ""
537
 
@@ -655,13 +655,13 @@ msgstr ""
655
 
656
  #: includes/admin/default-settings.php:540
657
  #: includes/admin/default-settings.php:713
658
- #: includes/modules/class-crp-widget.php:129
659
  msgid "Thumbnail width"
660
  msgstr ""
661
 
662
  #: includes/admin/default-settings.php:549
663
  #: includes/admin/default-settings.php:722
664
- #: includes/modules/class-crp-widget.php:124
665
  msgid "Thumbnail height"
666
  msgstr ""
667
 
@@ -860,7 +860,7 @@ msgid ""
860
  "target=\"_blank\">GitHub</a> (bug reports only)."
861
  msgstr ""
862
 
863
- #: includes/admin/help-tab.php:43 includes/admin/modules/loader.php:29
864
  msgid "Settings"
865
  msgstr ""
866
 
@@ -897,43 +897,43 @@ msgid ""
897
  "\" target=\"_blank\">knowledgebase article</a>."
898
  msgstr ""
899
 
900
- #: includes/admin/modules/loader.php:52 includes/admin/sidebar.php:60
901
  msgid "Support"
902
  msgstr ""
903
 
904
- #: includes/admin/modules/loader.php:53
905
  msgid "Donate"
906
  msgstr ""
907
 
908
- #: includes/admin/modules/loader.php:54
909
  msgid "Contribute"
910
  msgstr ""
911
 
912
- #: includes/admin/modules/metabox.php:115
913
  msgid "Disable Related Posts display:"
914
  msgstr ""
915
 
916
- #: includes/admin/modules/metabox.php:118
917
  msgid ""
918
  "If this is checked, then Contextual Related Posts will not automatically "
919
  "insert the related posts at the end of post content."
920
  msgstr ""
921
 
922
- #: includes/admin/modules/metabox.php:122
923
  msgid "Exclude this post from the related posts list:"
924
  msgstr ""
925
 
926
- #: includes/admin/modules/metabox.php:125
927
  msgid ""
928
  "If this is checked, then this post will be excluded from the popular posts "
929
  "list."
930
  msgstr ""
931
 
932
- #: includes/admin/modules/metabox.php:129
933
  msgid "Keyword:"
934
  msgstr ""
935
 
936
- #: includes/admin/modules/metabox.php:131
937
  msgid ""
938
  "Enter either a word or a phrase that will be used to find related posts. If "
939
  "entered, the plugin will continue to search the `post_title` and "
@@ -941,46 +941,46 @@ msgid ""
941
  "title and content of this post."
942
  msgstr ""
943
 
944
- #: includes/admin/modules/metabox.php:135
945
- #: includes/admin/modules/metabox.php:143
946
  msgid "Manual related posts:"
947
  msgstr ""
948
 
949
- #: includes/admin/modules/metabox.php:137
950
  msgid ""
951
  "Comma separated list of post, page or custom post type IDs. e.g. "
952
  "188,320,500. These will be given preference over the related posts generated "
953
  "by the plugin."
954
  msgstr ""
955
 
956
- #: includes/admin/modules/metabox.php:138
957
  msgid ""
958
  "Once you enter the list above and save this page, the plugin will display "
959
  "the titles of the posts below for your reference. Only IDs corresponding to "
960
  "published posts or custom post types will be retained."
961
  msgstr ""
962
 
963
- #: includes/admin/modules/metabox.php:154
964
  #, php-format
965
  msgid "This post type is: %s"
966
  msgstr ""
967
 
968
- #: includes/admin/modules/metabox.php:165
969
  msgid "Location of thumbnail"
970
  msgstr ""
971
 
972
- #: includes/admin/modules/metabox.php:167
973
  msgid ""
974
  "Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
975
  "image will be used for the post. It will be resized to the thumbnail size "
976
  "set under Settings &raquo; Related Posts &raquo; Output Options"
977
  msgstr ""
978
 
979
- #: includes/admin/modules/metabox.php:168
980
  msgid "The URL above is saved in the meta field:"
981
  msgstr ""
982
 
983
- #: includes/admin/modules/metabox.php:173
984
  msgid ""
985
  "You have Top 10 WordPress Plugin installed. If you are trying to modify the "
986
  "thumbnail, then you'll need to make the same change in the Top 10 meta box "
@@ -1217,82 +1217,82 @@ msgstr ""
1217
  msgid "Follow me"
1218
  msgstr ""
1219
 
1220
- #: includes/main-query.php:209
1221
  #, php-format
1222
  msgid ""
1223
  "Powered by <a href=\"%s\" rel=\"nofollow\" style=\"float:none\">Contextual "
1224
  "Related Posts</a>"
1225
  msgstr ""
1226
 
1227
- #: includes/media.php:69
1228
  msgid "thumb_timthumb argument has been deprecated"
1229
  msgstr ""
1230
 
1231
- #: includes/media.php:73
1232
  msgid "thumb_timthumb_q argument has been deprecated"
1233
  msgstr ""
1234
 
1235
- #: includes/media.php:77
1236
  msgid "filter argument has been deprecated"
1237
  msgstr ""
1238
 
1239
- #: includes/modules/class-crp-widget.php:34
1240
  msgid "Display Related Posts"
1241
  msgstr ""
1242
 
1243
- #: includes/modules/class-crp-widget.php:85
1244
  msgid "Title"
1245
  msgstr ""
1246
 
1247
- #: includes/modules/class-crp-widget.php:100
1248
  msgid " Show excerpt?"
1249
  msgstr ""
1250
 
1251
- #: includes/modules/class-crp-widget.php:105
1252
  msgid " Show author?"
1253
  msgstr ""
1254
 
1255
- #: includes/modules/class-crp-widget.php:110
1256
  msgid " Show date?"
1257
  msgstr ""
1258
 
1259
- #: includes/modules/class-crp-widget.php:116
1260
  msgid "Thumbnails inline, before title"
1261
  msgstr ""
1262
 
1263
- #: includes/modules/class-crp-widget.php:117
1264
  msgid "Thumbnails inline, after title"
1265
  msgstr ""
1266
 
1267
- #: includes/modules/class-crp-widget.php:118
1268
  msgid "Only thumbnails, no text"
1269
  msgstr ""
1270
 
1271
- #: includes/modules/class-crp-widget.php:119
1272
  msgid "No thumbnails, only text."
1273
  msgstr ""
1274
 
1275
- #: includes/modules/class-crp-widget.php:146
1276
  msgid " Randomize posts"
1277
  msgstr ""
1278
 
1279
- #: includes/modules/class-crp-widget.php:151
1280
  msgid "Only from categories"
1281
  msgstr ""
1282
 
1283
- #: includes/output-generator.php:239
1284
  msgid " by "
1285
  msgstr ""
1286
 
1287
- #: includes/tools.php:79
1288
  #, php-format
1289
  msgid "Continue reading %s"
1290
  msgstr ""
1291
 
1292
- #: includes/tools.php:87
1293
  msgid "(more&hellip;)"
1294
  msgstr ""
1295
 
1296
- #: includes/tools.php:115
1297
  msgid "There is no excerpt because this is a protected post."
1298
  msgstr ""
2
  msgstr ""
3
  "Project-Id-Version: Contextual Related Posts\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2021-01-09 16:41+0000\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Ajay D'Souza\n"
8
  "Language-Team: WebberZone\n"
45
 
46
  #: includes/admin/blocks/related-posts/index.js:22
47
  #: includes/admin/blocks/related-posts/index.min.js:1
48
+ #: includes/modules/class-crp-widget.php:28
49
  msgid "Related Posts [CRP]"
50
  msgstr ""
51
 
76
 
77
  #: includes/admin/blocks/related-posts/index.js:146
78
  #: includes/admin/blocks/related-posts/index.min.js:1
79
+ #: includes/modules/class-crp-widget.php:86
80
  msgid "No. of posts"
81
  msgstr ""
82
 
83
  #: includes/admin/blocks/related-posts/index.js:157
84
  #: includes/admin/blocks/related-posts/index.min.js:1
85
+ #: includes/modules/class-crp-widget.php:91
86
  msgid "Offset"
87
  msgstr ""
88
 
105
 
106
  #: includes/admin/blocks/related-posts/index.js:184
107
  #: includes/admin/blocks/related-posts/index.min.js:1
108
+ #: includes/modules/class-crp-widget.php:110
109
  msgid "Thumbnail options"
110
  msgstr ""
111
 
496
  msgstr ""
497
 
498
  #: includes/admin/default-settings.php:397
499
+ #: includes/modules/class-crp-widget.php:128
500
  msgid "Order posts"
501
  msgstr ""
502
 
531
  msgstr ""
532
 
533
  #: includes/admin/default-settings.php:429
534
+ #: includes/modules/class-crp-widget.php:152
535
  msgid "Post types to include"
536
  msgstr ""
537
 
655
 
656
  #: includes/admin/default-settings.php:540
657
  #: includes/admin/default-settings.php:713
658
+ #: includes/modules/class-crp-widget.php:125
659
  msgid "Thumbnail width"
660
  msgstr ""
661
 
662
  #: includes/admin/default-settings.php:549
663
  #: includes/admin/default-settings.php:722
664
+ #: includes/modules/class-crp-widget.php:120
665
  msgid "Thumbnail height"
666
  msgstr ""
667
 
860
  "target=\"_blank\">GitHub</a> (bug reports only)."
861
  msgstr ""
862
 
863
+ #: includes/admin/help-tab.php:43 includes/admin/modules/loader.php:25
864
  msgid "Settings"
865
  msgstr ""
866
 
897
  "\" target=\"_blank\">knowledgebase article</a>."
898
  msgstr ""
899
 
900
+ #: includes/admin/modules/loader.php:48 includes/admin/sidebar.php:60
901
  msgid "Support"
902
  msgstr ""
903
 
904
+ #: includes/admin/modules/loader.php:49
905
  msgid "Donate"
906
  msgstr ""
907
 
908
+ #: includes/admin/modules/loader.php:50
909
  msgid "Contribute"
910
  msgstr ""
911
 
912
+ #: includes/admin/modules/metabox.php:111
913
  msgid "Disable Related Posts display:"
914
  msgstr ""
915
 
916
+ #: includes/admin/modules/metabox.php:114
917
  msgid ""
918
  "If this is checked, then Contextual Related Posts will not automatically "
919
  "insert the related posts at the end of post content."
920
  msgstr ""
921
 
922
+ #: includes/admin/modules/metabox.php:118
923
  msgid "Exclude this post from the related posts list:"
924
  msgstr ""
925
 
926
+ #: includes/admin/modules/metabox.php:121
927
  msgid ""
928
  "If this is checked, then this post will be excluded from the popular posts "
929
  "list."
930
  msgstr ""
931
 
932
+ #: includes/admin/modules/metabox.php:125
933
  msgid "Keyword:"
934
  msgstr ""
935
 
936
+ #: includes/admin/modules/metabox.php:127
937
  msgid ""
938
  "Enter either a word or a phrase that will be used to find related posts. If "
939
  "entered, the plugin will continue to search the `post_title` and "
941
  "title and content of this post."
942
  msgstr ""
943
 
944
+ #: includes/admin/modules/metabox.php:131
945
+ #: includes/admin/modules/metabox.php:139
946
  msgid "Manual related posts:"
947
  msgstr ""
948
 
949
+ #: includes/admin/modules/metabox.php:133
950
  msgid ""
951
  "Comma separated list of post, page or custom post type IDs. e.g. "
952
  "188,320,500. These will be given preference over the related posts generated "
953
  "by the plugin."
954
  msgstr ""
955
 
956
+ #: includes/admin/modules/metabox.php:134
957
  msgid ""
958
  "Once you enter the list above and save this page, the plugin will display "
959
  "the titles of the posts below for your reference. Only IDs corresponding to "
960
  "published posts or custom post types will be retained."
961
  msgstr ""
962
 
963
+ #: includes/admin/modules/metabox.php:150
964
  #, php-format
965
  msgid "This post type is: %s"
966
  msgstr ""
967
 
968
+ #: includes/admin/modules/metabox.php:161
969
  msgid "Location of thumbnail"
970
  msgstr ""
971
 
972
+ #: includes/admin/modules/metabox.php:163
973
  msgid ""
974
  "Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
975
  "image will be used for the post. It will be resized to the thumbnail size "
976
  "set under Settings &raquo; Related Posts &raquo; Output Options"
977
  msgstr ""
978
 
979
+ #: includes/admin/modules/metabox.php:164
980
  msgid "The URL above is saved in the meta field:"
981
  msgstr ""
982
 
983
+ #: includes/admin/modules/metabox.php:169
984
  msgid ""
985
  "You have Top 10 WordPress Plugin installed. If you are trying to modify the "
986
  "thumbnail, then you'll need to make the same change in the Top 10 meta box "
1217
  msgid "Follow me"
1218
  msgstr ""
1219
 
1220
+ #: includes/main-query.php:205
1221
  #, php-format
1222
  msgid ""
1223
  "Powered by <a href=\"%s\" rel=\"nofollow\" style=\"float:none\">Contextual "
1224
  "Related Posts</a>"
1225
  msgstr ""
1226
 
1227
+ #: includes/media.php:65
1228
  msgid "thumb_timthumb argument has been deprecated"
1229
  msgstr ""
1230
 
1231
+ #: includes/media.php:69
1232
  msgid "thumb_timthumb_q argument has been deprecated"
1233
  msgstr ""
1234
 
1235
+ #: includes/media.php:73
1236
  msgid "filter argument has been deprecated"
1237
  msgstr ""
1238
 
1239
+ #: includes/modules/class-crp-widget.php:30
1240
  msgid "Display Related Posts"
1241
  msgstr ""
1242
 
1243
+ #: includes/modules/class-crp-widget.php:81
1244
  msgid "Title"
1245
  msgstr ""
1246
 
1247
+ #: includes/modules/class-crp-widget.php:96
1248
  msgid " Show excerpt?"
1249
  msgstr ""
1250
 
1251
+ #: includes/modules/class-crp-widget.php:101
1252
  msgid " Show author?"
1253
  msgstr ""
1254
 
1255
+ #: includes/modules/class-crp-widget.php:106
1256
  msgid " Show date?"
1257
  msgstr ""
1258
 
1259
+ #: includes/modules/class-crp-widget.php:112
1260
  msgid "Thumbnails inline, before title"
1261
  msgstr ""
1262
 
1263
+ #: includes/modules/class-crp-widget.php:113
1264
  msgid "Thumbnails inline, after title"
1265
  msgstr ""
1266
 
1267
+ #: includes/modules/class-crp-widget.php:114
1268
  msgid "Only thumbnails, no text"
1269
  msgstr ""
1270
 
1271
+ #: includes/modules/class-crp-widget.php:115
1272
  msgid "No thumbnails, only text."
1273
  msgstr ""
1274
 
1275
+ #: includes/modules/class-crp-widget.php:142
1276
  msgid " Randomize posts"
1277
  msgstr ""
1278
 
1279
+ #: includes/modules/class-crp-widget.php:147
1280
  msgid "Only from categories"
1281
  msgstr ""
1282
 
1283
+ #: includes/output-generator.php:235
1284
  msgid " by "
1285
  msgstr ""
1286
 
1287
+ #: includes/tools.php:75
1288
  #, php-format
1289
  msgid "Continue reading %s"
1290
  msgstr ""
1291
 
1292
+ #: includes/tools.php:83
1293
  msgid "(more&hellip;)"
1294
  msgstr ""
1295
 
1296
+ #: includes/tools.php:111
1297
  msgid "There is no excerpt because this is a protected post."
1298
  msgstr ""
languages/contextual-related-posts-en_US.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Contextual Related Posts\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2021-01-07 18:05+0000\n"
7
  "PO-Revision-Date: \n"
8
  "Last-Translator: Ajay D'Souza\n"
9
  "Language-Team: WebberZone\n"
@@ -45,7 +45,7 @@ msgstr ""
45
 
46
  #: includes/admin/blocks/related-posts/index.js:22
47
  #: includes/admin/blocks/related-posts/index.min.js:1
48
- #: includes/modules/class-crp-widget.php:32
49
  msgid "Related Posts [CRP]"
50
  msgstr ""
51
 
@@ -76,13 +76,13 @@ msgstr ""
76
 
77
  #: includes/admin/blocks/related-posts/index.js:146
78
  #: includes/admin/blocks/related-posts/index.min.js:1
79
- #: includes/modules/class-crp-widget.php:90
80
  msgid "No. of posts"
81
  msgstr ""
82
 
83
  #: includes/admin/blocks/related-posts/index.js:157
84
  #: includes/admin/blocks/related-posts/index.min.js:1
85
- #: includes/modules/class-crp-widget.php:95
86
  msgid "Offset"
87
  msgstr ""
88
 
@@ -105,7 +105,7 @@ msgstr ""
105
 
106
  #: includes/admin/blocks/related-posts/index.js:184
107
  #: includes/admin/blocks/related-posts/index.min.js:1
108
- #: includes/modules/class-crp-widget.php:114
109
  msgid "Thumbnail options"
110
  msgstr ""
111
 
@@ -496,7 +496,7 @@ msgid ""
496
  msgstr ""
497
 
498
  #: includes/admin/default-settings.php:397
499
- #: includes/modules/class-crp-widget.php:132
500
  msgid "Order posts"
501
  msgstr ""
502
 
@@ -531,7 +531,7 @@ msgid ""
531
  msgstr ""
532
 
533
  #: includes/admin/default-settings.php:429
534
- #: includes/modules/class-crp-widget.php:156
535
  msgid "Post types to include"
536
  msgstr ""
537
 
@@ -655,13 +655,13 @@ msgstr ""
655
 
656
  #: includes/admin/default-settings.php:540
657
  #: includes/admin/default-settings.php:713
658
- #: includes/modules/class-crp-widget.php:129
659
  msgid "Thumbnail width"
660
  msgstr ""
661
 
662
  #: includes/admin/default-settings.php:549
663
  #: includes/admin/default-settings.php:722
664
- #: includes/modules/class-crp-widget.php:124
665
  msgid "Thumbnail height"
666
  msgstr ""
667
 
@@ -860,7 +860,7 @@ msgid ""
860
  "target=\"_blank\">GitHub</a> (bug reports only)."
861
  msgstr ""
862
 
863
- #: includes/admin/help-tab.php:43 includes/admin/modules/loader.php:29
864
  msgid "Settings"
865
  msgstr ""
866
 
@@ -897,43 +897,43 @@ msgid ""
897
  "\" target=\"_blank\">knowledgebase article</a>."
898
  msgstr ""
899
 
900
- #: includes/admin/modules/loader.php:52 includes/admin/sidebar.php:60
901
  msgid "Support"
902
  msgstr ""
903
 
904
- #: includes/admin/modules/loader.php:53
905
  msgid "Donate"
906
  msgstr ""
907
 
908
- #: includes/admin/modules/loader.php:54
909
  msgid "Contribute"
910
  msgstr ""
911
 
912
- #: includes/admin/modules/metabox.php:115
913
  msgid "Disable Related Posts display:"
914
  msgstr ""
915
 
916
- #: includes/admin/modules/metabox.php:118
917
  msgid ""
918
  "If this is checked, then Contextual Related Posts will not automatically "
919
  "insert the related posts at the end of post content."
920
  msgstr ""
921
 
922
- #: includes/admin/modules/metabox.php:122
923
  msgid "Exclude this post from the related posts list:"
924
  msgstr ""
925
 
926
- #: includes/admin/modules/metabox.php:125
927
  msgid ""
928
  "If this is checked, then this post will be excluded from the popular posts "
929
  "list."
930
  msgstr ""
931
 
932
- #: includes/admin/modules/metabox.php:129
933
  msgid "Keyword:"
934
  msgstr ""
935
 
936
- #: includes/admin/modules/metabox.php:131
937
  msgid ""
938
  "Enter either a word or a phrase that will be used to find related posts. If "
939
  "entered, the plugin will continue to search the `post_title` and "
@@ -941,46 +941,46 @@ msgid ""
941
  "title and content of this post."
942
  msgstr ""
943
 
944
- #: includes/admin/modules/metabox.php:135
945
- #: includes/admin/modules/metabox.php:143
946
  msgid "Manual related posts:"
947
  msgstr ""
948
 
949
- #: includes/admin/modules/metabox.php:137
950
  msgid ""
951
  "Comma separated list of post, page or custom post type IDs. e.g. "
952
  "188,320,500. These will be given preference over the related posts generated "
953
  "by the plugin."
954
  msgstr ""
955
 
956
- #: includes/admin/modules/metabox.php:138
957
  msgid ""
958
  "Once you enter the list above and save this page, the plugin will display "
959
  "the titles of the posts below for your reference. Only IDs corresponding to "
960
  "published posts or custom post types will be retained."
961
  msgstr ""
962
 
963
- #: includes/admin/modules/metabox.php:154
964
  #, php-format
965
  msgid "This post type is: %s"
966
  msgstr ""
967
 
968
- #: includes/admin/modules/metabox.php:165
969
  msgid "Location of thumbnail"
970
  msgstr ""
971
 
972
- #: includes/admin/modules/metabox.php:167
973
  msgid ""
974
  "Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
975
  "image will be used for the post. It will be resized to the thumbnail size "
976
  "set under Settings &raquo; Related Posts &raquo; Output Options"
977
  msgstr ""
978
 
979
- #: includes/admin/modules/metabox.php:168
980
  msgid "The URL above is saved in the meta field:"
981
  msgstr ""
982
 
983
- #: includes/admin/modules/metabox.php:173
984
  msgid ""
985
  "You have Top 10 WordPress Plugin installed. If you are trying to modify the "
986
  "thumbnail, then you'll need to make the same change in the Top 10 meta box "
@@ -1217,82 +1217,82 @@ msgstr ""
1217
  msgid "Follow me"
1218
  msgstr ""
1219
 
1220
- #: includes/main-query.php:209
1221
  #, php-format
1222
  msgid ""
1223
  "Powered by <a href=\"%s\" rel=\"nofollow\" style=\"float:none\">Contextual "
1224
  "Related Posts</a>"
1225
  msgstr ""
1226
 
1227
- #: includes/media.php:69
1228
  msgid "thumb_timthumb argument has been deprecated"
1229
  msgstr ""
1230
 
1231
- #: includes/media.php:73
1232
  msgid "thumb_timthumb_q argument has been deprecated"
1233
  msgstr ""
1234
 
1235
- #: includes/media.php:77
1236
  msgid "filter argument has been deprecated"
1237
  msgstr ""
1238
 
1239
- #: includes/modules/class-crp-widget.php:34
1240
  msgid "Display Related Posts"
1241
  msgstr ""
1242
 
1243
- #: includes/modules/class-crp-widget.php:85
1244
  msgid "Title"
1245
  msgstr ""
1246
 
1247
- #: includes/modules/class-crp-widget.php:100
1248
  msgid " Show excerpt?"
1249
  msgstr ""
1250
 
1251
- #: includes/modules/class-crp-widget.php:105
1252
  msgid " Show author?"
1253
  msgstr ""
1254
 
1255
- #: includes/modules/class-crp-widget.php:110
1256
  msgid " Show date?"
1257
  msgstr ""
1258
 
1259
- #: includes/modules/class-crp-widget.php:116
1260
  msgid "Thumbnails inline, before title"
1261
  msgstr ""
1262
 
1263
- #: includes/modules/class-crp-widget.php:117
1264
  msgid "Thumbnails inline, after title"
1265
  msgstr ""
1266
 
1267
- #: includes/modules/class-crp-widget.php:118
1268
  msgid "Only thumbnails, no text"
1269
  msgstr ""
1270
 
1271
- #: includes/modules/class-crp-widget.php:119
1272
  msgid "No thumbnails, only text."
1273
  msgstr ""
1274
 
1275
- #: includes/modules/class-crp-widget.php:146
1276
  msgid " Randomize posts"
1277
  msgstr ""
1278
 
1279
- #: includes/modules/class-crp-widget.php:151
1280
  msgid "Only from categories"
1281
  msgstr ""
1282
 
1283
- #: includes/output-generator.php:239
1284
  msgid " by "
1285
  msgstr ""
1286
 
1287
- #: includes/tools.php:79
1288
  #, php-format
1289
  msgid "Continue reading %s"
1290
  msgstr ""
1291
 
1292
- #: includes/tools.php:87
1293
  msgid "(more&hellip;)"
1294
  msgstr ""
1295
 
1296
- #: includes/tools.php:115
1297
  msgid "There is no excerpt because this is a protected post."
1298
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: Contextual Related Posts\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2021-01-09 16:41+0000\n"
7
  "PO-Revision-Date: \n"
8
  "Last-Translator: Ajay D'Souza\n"
9
  "Language-Team: WebberZone\n"
45
 
46
  #: includes/admin/blocks/related-posts/index.js:22
47
  #: includes/admin/blocks/related-posts/index.min.js:1
48
+ #: includes/modules/class-crp-widget.php:28
49
  msgid "Related Posts [CRP]"
50
  msgstr ""
51
 
76
 
77
  #: includes/admin/blocks/related-posts/index.js:146
78
  #: includes/admin/blocks/related-posts/index.min.js:1
79
+ #: includes/modules/class-crp-widget.php:86
80
  msgid "No. of posts"
81
  msgstr ""
82
 
83
  #: includes/admin/blocks/related-posts/index.js:157
84
  #: includes/admin/blocks/related-posts/index.min.js:1
85
+ #: includes/modules/class-crp-widget.php:91
86
  msgid "Offset"
87
  msgstr ""
88
 
105
 
106
  #: includes/admin/blocks/related-posts/index.js:184
107
  #: includes/admin/blocks/related-posts/index.min.js:1
108
+ #: includes/modules/class-crp-widget.php:110
109
  msgid "Thumbnail options"
110
  msgstr ""
111
 
496
  msgstr ""
497
 
498
  #: includes/admin/default-settings.php:397
499
+ #: includes/modules/class-crp-widget.php:128
500
  msgid "Order posts"
501
  msgstr ""
502
 
531
  msgstr ""
532
 
533
  #: includes/admin/default-settings.php:429
534
+ #: includes/modules/class-crp-widget.php:152
535
  msgid "Post types to include"
536
  msgstr ""
537
 
655
 
656
  #: includes/admin/default-settings.php:540
657
  #: includes/admin/default-settings.php:713
658
+ #: includes/modules/class-crp-widget.php:125
659
  msgid "Thumbnail width"
660
  msgstr ""
661
 
662
  #: includes/admin/default-settings.php:549
663
  #: includes/admin/default-settings.php:722
664
+ #: includes/modules/class-crp-widget.php:120
665
  msgid "Thumbnail height"
666
  msgstr ""
667
 
860
  "target=\"_blank\">GitHub</a> (bug reports only)."
861
  msgstr ""
862
 
863
+ #: includes/admin/help-tab.php:43 includes/admin/modules/loader.php:25
864
  msgid "Settings"
865
  msgstr ""
866
 
897
  "\" target=\"_blank\">knowledgebase article</a>."
898
  msgstr ""
899
 
900
+ #: includes/admin/modules/loader.php:48 includes/admin/sidebar.php:60
901
  msgid "Support"
902
  msgstr ""
903
 
904
+ #: includes/admin/modules/loader.php:49
905
  msgid "Donate"
906
  msgstr ""
907
 
908
+ #: includes/admin/modules/loader.php:50
909
  msgid "Contribute"
910
  msgstr ""
911
 
912
+ #: includes/admin/modules/metabox.php:111
913
  msgid "Disable Related Posts display:"
914
  msgstr ""
915
 
916
+ #: includes/admin/modules/metabox.php:114
917
  msgid ""
918
  "If this is checked, then Contextual Related Posts will not automatically "
919
  "insert the related posts at the end of post content."
920
  msgstr ""
921
 
922
+ #: includes/admin/modules/metabox.php:118
923
  msgid "Exclude this post from the related posts list:"
924
  msgstr ""
925
 
926
+ #: includes/admin/modules/metabox.php:121
927
  msgid ""
928
  "If this is checked, then this post will be excluded from the popular posts "
929
  "list."
930
  msgstr ""
931
 
932
+ #: includes/admin/modules/metabox.php:125
933
  msgid "Keyword:"
934
  msgstr ""
935
 
936
+ #: includes/admin/modules/metabox.php:127
937
  msgid ""
938
  "Enter either a word or a phrase that will be used to find related posts. If "
939
  "entered, the plugin will continue to search the `post_title` and "
941
  "title and content of this post."
942
  msgstr ""
943
 
944
+ #: includes/admin/modules/metabox.php:131
945
+ #: includes/admin/modules/metabox.php:139
946
  msgid "Manual related posts:"
947
  msgstr ""
948
 
949
+ #: includes/admin/modules/metabox.php:133
950
  msgid ""
951
  "Comma separated list of post, page or custom post type IDs. e.g. "
952
  "188,320,500. These will be given preference over the related posts generated "
953
  "by the plugin."
954
  msgstr ""
955
 
956
+ #: includes/admin/modules/metabox.php:134
957
  msgid ""
958
  "Once you enter the list above and save this page, the plugin will display "
959
  "the titles of the posts below for your reference. Only IDs corresponding to "
960
  "published posts or custom post types will be retained."
961
  msgstr ""
962
 
963
+ #: includes/admin/modules/metabox.php:150
964
  #, php-format
965
  msgid "This post type is: %s"
966
  msgstr ""
967
 
968
+ #: includes/admin/modules/metabox.php:161
969
  msgid "Location of thumbnail"
970
  msgstr ""
971
 
972
+ #: includes/admin/modules/metabox.php:163
973
  msgid ""
974
  "Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
975
  "image will be used for the post. It will be resized to the thumbnail size "
976
  "set under Settings &raquo; Related Posts &raquo; Output Options"
977
  msgstr ""
978
 
979
+ #: includes/admin/modules/metabox.php:164
980
  msgid "The URL above is saved in the meta field:"
981
  msgstr ""
982
 
983
+ #: includes/admin/modules/metabox.php:169
984
  msgid ""
985
  "You have Top 10 WordPress Plugin installed. If you are trying to modify the "
986
  "thumbnail, then you'll need to make the same change in the Top 10 meta box "
1217
  msgid "Follow me"
1218
  msgstr ""
1219
 
1220
+ #: includes/main-query.php:205
1221
  #, php-format
1222
  msgid ""
1223
  "Powered by <a href=\"%s\" rel=\"nofollow\" style=\"float:none\">Contextual "
1224
  "Related Posts</a>"
1225
  msgstr ""
1226
 
1227
+ #: includes/media.php:65
1228
  msgid "thumb_timthumb argument has been deprecated"
1229
  msgstr ""
1230
 
1231
+ #: includes/media.php:69
1232
  msgid "thumb_timthumb_q argument has been deprecated"
1233
  msgstr ""
1234
 
1235
+ #: includes/media.php:73
1236
  msgid "filter argument has been deprecated"
1237
  msgstr ""
1238
 
1239
+ #: includes/modules/class-crp-widget.php:30
1240
  msgid "Display Related Posts"
1241
  msgstr ""
1242
 
1243
+ #: includes/modules/class-crp-widget.php:81
1244
  msgid "Title"
1245
  msgstr ""
1246
 
1247
+ #: includes/modules/class-crp-widget.php:96
1248
  msgid " Show excerpt?"
1249
  msgstr ""
1250
 
1251
+ #: includes/modules/class-crp-widget.php:101
1252
  msgid " Show author?"
1253
  msgstr ""
1254
 
1255
+ #: includes/modules/class-crp-widget.php:106
1256
  msgid " Show date?"
1257
  msgstr ""
1258
 
1259
+ #: includes/modules/class-crp-widget.php:112
1260
  msgid "Thumbnails inline, before title"
1261
  msgstr ""
1262
 
1263
+ #: includes/modules/class-crp-widget.php:113
1264
  msgid "Thumbnails inline, after title"
1265
  msgstr ""
1266
 
1267
+ #: includes/modules/class-crp-widget.php:114
1268
  msgid "Only thumbnails, no text"
1269
  msgstr ""
1270
 
1271
+ #: includes/modules/class-crp-widget.php:115
1272
  msgid "No thumbnails, only text."
1273
  msgstr ""
1274
 
1275
+ #: includes/modules/class-crp-widget.php:142
1276
  msgid " Randomize posts"
1277
  msgstr ""
1278
 
1279
+ #: includes/modules/class-crp-widget.php:147
1280
  msgid "Only from categories"
1281
  msgstr ""
1282
 
1283
+ #: includes/output-generator.php:235
1284
  msgid " by "
1285
  msgstr ""
1286
 
1287
+ #: includes/tools.php:75
1288
  #, php-format
1289
  msgid "Continue reading %s"
1290
  msgstr ""
1291
 
1292
+ #: includes/tools.php:83
1293
  msgid "(more&hellip;)"
1294
  msgstr ""
1295
 
1296
+ #: includes/tools.php:111
1297
  msgid "There is no excerpt because this is a protected post."
1298
  msgstr ""
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: related posts, related, related articles, contextual related posts, similar posts, related posts widget
3
  Contributors: webberzone, Ajay
4
  Donate link: https://ajaydsouza.com/donate/
5
- Stable tag: 3.0.1
6
  Requires at least: 5.0
7
  Tested up to: 5.6
8
  Requires PHP: 5.6
@@ -174,6 +174,13 @@ You can insert the related posts anywhere in your post using the `[crp]` shortco
174
 
175
  == Changelog ==
176
 
 
 
 
 
 
 
 
177
  = 3.0.1 =
178
 
179
  * Bug fixes:
@@ -211,5 +218,5 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
211
 
212
  == Upgrade Notice ==
213
 
214
- = 3.0.1 =
215
  Major release. Filters deprecated. Resave settings on upgrade. Please read the release post on https://webberzone.com
2
  Tags: related posts, related, related articles, contextual related posts, similar posts, related posts widget
3
  Contributors: webberzone, Ajay
4
  Donate link: https://ajaydsouza.com/donate/
5
+ Stable tag: 3.0.2
6
  Requires at least: 5.0
7
  Tested up to: 5.6
8
  Requires PHP: 5.6
174
 
175
  == Changelog ==
176
 
177
+ = 3.0.2 =
178
+
179
+ * Bug fixes:
180
+ * Fixed issue where Related Posts newer than was set to 0 caused no posts to display
181
+ * Use the original arguments when setting the cache key for CRP_Query
182
+ * Selecting "Blank Output" didn't work
183
+
184
  = 3.0.1 =
185
 
186
  * Bug fixes:
218
 
219
  == Upgrade Notice ==
220
 
221
+ = 3.0.2 =
222
  Major release. Filters deprecated. Resave settings on upgrade. Please read the release post on https://webberzone.com