Contextual Related Posts - Version 2.8.0

Version Description

Release post: https://webberzone.com/blog/contextual-related-posts-v2-8-0/

  • Features:

    • New block for Gutenberg aka the block editor. The block is called Related Posts [CRP] and you can find it under the widgets category
    • Two new settings in the widget: Order posts and Randomize order that allows the global setting to be overridden
    • New setting called Keyword in the Meta box where you can enter a word or a phrase to find related posts. If entered, the plugin will continue to search the post_title and post_content fields but will use this keyword instead of the values of the title and content of the source post
  • Enhancements:

    • Show author, Show date, Show post excerpt and Post thumbnail settings will show a message that they cannnot be modified in case the Rounded thumbnails or No text styles are selected
  • Bug fixes:

    • Selecting date order now orders the related posts by newest first
    • Fixed PHP warning in the widget
    • Stop using current_time( 'timestamp' )
    • Fixes incorrect thumbnail image displayed for attachments in the related posts list
Download this release

Release Info

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

Code changes from version 2.7.0 to 2.8.0

README.md CHANGED
@@ -6,9 +6,9 @@
6
  [![Build Status](https://travis-ci.org/WebberZone/contextual-related-posts.svg?branch=master)](https://travis-ci.org/WebberZone/contextual-related-posts)
7
  [![Code Climate](https://codeclimate.com/github/WebberZone/contextual-related-posts/badges/gpa.svg)](https://codeclimate.com/github/WebberZone/contextual-related-posts)
8
 
9
- __Requires:__ 4.7
10
 
11
- __Tested up to:__ 5.2
12
 
13
  __License:__ [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)
14
 
@@ -29,11 +29,12 @@ And the default inbuilt styles allow you to switch between gorgeous thumbnail-ri
29
  ### Key features
30
 
31
  * **Automatic**: CRP will start displaying related posts on your site and feed automatically after the content when you activate the plugin. No need to edit template files
32
- * **Manual install**: Want more control over placement? Check the [FAQ](https://wordpress.org/extend/plugins/contextual-related-posts/faq/) on which functions are available for manual install.
33
- * **Caching**: Related posts output is automatically cached as visitors browse through your site
34
  * **Widgets**: Add related posts to widgetized area of your theme. Lots of options available
35
  * **Shortcode**: Use `[crp]` to display the posts anywhere you want in the post content
36
  * **The algorithm**: Find related posts by title and/or content of the current post
 
37
  * **Exclusions**: Exclude posts from categories from being displayed in the list. Or you can exclude posts or pages by ID
38
  * **Custom post types**: The related posts list lets you include posts, pages, attachments or any other custom post type!
39
  * **Thumbnail support**:
6
  [![Build Status](https://travis-ci.org/WebberZone/contextual-related-posts.svg?branch=master)](https://travis-ci.org/WebberZone/contextual-related-posts)
7
  [![Code Climate](https://codeclimate.com/github/WebberZone/contextual-related-posts/badges/gpa.svg)](https://codeclimate.com/github/WebberZone/contextual-related-posts)
8
 
9
+ __Requires:__ 4.8
10
 
11
+ __Tested up to:__ 5.3
12
 
13
  __License:__ [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)
14
 
29
  ### Key features
30
 
31
  * **Automatic**: CRP will start displaying related posts on your site and feed automatically after the content when you activate the plugin. No need to edit template files
32
+ * **Manual install**: Want more control over placement? Check the [FAQ](http://wordpress.org/extend/plugins/contextual-related-posts/faq/) on which functions are available for manual install
33
+ * **Gutenberg / Block Editor support**: You can find a block called "Related Posts [CRP]" with its own configurable set of options
34
  * **Widgets**: Add related posts to widgetized area of your theme. Lots of options available
35
  * **Shortcode**: Use `[crp]` to display the posts anywhere you want in the post content
36
  * **The algorithm**: Find related posts by title and/or content of the current post
37
+ * **Caching**: Related posts output is automatically cached as visitors browse through your site
38
  * **Exclusions**: Exclude posts from categories from being displayed in the list. Or you can exclude posts or pages by ID
39
  * **Custom post types**: The related posts list lets you include posts, pages, attachments or any other custom post type!
40
  * **Thumbnail support**:
changelog.txt CHANGED
@@ -2,6 +2,57 @@
2
 
3
  This is an archive of older changelog entries. Most recent entries are maintained in readme.txt
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  = 2.5.1 =
6
 
7
  * Features:
2
 
3
  This is an archive of older changelog entries. Most recent entries are maintained in readme.txt
4
 
5
+ = 2.7.0 =
6
+
7
+ * Features:
8
+ * Caching improvements: "Enable cache" has been renamed to "Cache HTML output". New option "Cache posts only" has been introduced to cache the output of the database query (array of posts)
9
+ * New option to order posts by relevance, dates or randomly
10
+ * New option to limit posts by the same author
11
+ * Thumbnail HTML markup includes `srcset` and `sizes` attributes when available. Read [Responsive Images in WordPress 4.4](https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/)
12
+
13
+ * Enhancements:
14
+ * No longer use `get_the_title`. You can use `crp_title` and/or `crp_thumb_title` filters to edit the post title and the alt/title attributes of the thumbnail respectively
15
+ * Selecting Rounded thumbnails under Styles tab will allow your thumbnail setting to either be "inline before text" or "only thumbnails, no text"
16
+
17
+ = 2.6.3 =
18
+
19
+ * Enhancements:
20
+ * Optimized versions of default.png and default2.png
21
+
22
+ * Bug fixes:
23
+ * Fixed PHP error when viewing feed
24
+ * "Exclude categories" setting wouldn't save properly
25
+ * Delete any deprecated settings on save should work properly
26
+ * Clearer messages when saving options and a style is activated
27
+
28
+ = 2.6.2 =
29
+
30
+ * Bug fixes:
31
+ * Fixed PHP fatal error "Can’t use function return value in write context"
32
+ * Changed default setting for thumbnail width and height to 150
33
+
34
+ = 2.6.1 =
35
+
36
+ * Features:
37
+ * New options to delete options and/or data on uninstall. This will only work if you visit the Settings page and save the pages.
38
+
39
+ * Bug fixes:
40
+ * Custom CSS code should now be properly added to the header
41
+ * Upgrading settings when "Automatically add related posts to" had no options checked should work properly
42
+
43
+ = 2.6.0 =
44
+
45
+ * Features:
46
+ * Implemented the Settings API for handling plugin settings
47
+ * New Tools page: Recreate the indices, delete the cache and delete old settings
48
+
49
+ * Enhancements:
50
+ * `widget_title` filter includes `$instance` and `id_base` variables
51
+
52
+ * Bug fixes:
53
+ * Checked for non-zero thumbnail width and height in the widget
54
+ * More checks for PHP errors and notices
55
+
56
  = 2.5.1 =
57
 
58
  * Features:
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: 2.7.0
19
  * Author: WebberZone
20
  * Author URI: https://webberzone.com
21
  * License: GPL-2.0+
@@ -96,6 +96,7 @@ require_once CRP_PLUGIN_DIR . 'includes/modules/shortcode.php';
96
  require_once CRP_PLUGIN_DIR . 'includes/modules/taxonomies.php';
97
  require_once CRP_PLUGIN_DIR . 'includes/modules/exclusions.php';
98
  require_once CRP_PLUGIN_DIR . 'includes/modules/class-crp-widget.php';
 
99
 
100
 
101
  /*
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: 2.8.0
19
  * Author: WebberZone
20
  * Author URI: https://webberzone.com
21
  * License: GPL-2.0+
96
  require_once CRP_PLUGIN_DIR . 'includes/modules/taxonomies.php';
97
  require_once CRP_PLUGIN_DIR . 'includes/modules/exclusions.php';
98
  require_once CRP_PLUGIN_DIR . 'includes/modules/class-crp-widget.php';
99
+ require_once CRP_PLUGIN_DIR . 'includes/admin/blocks/related-posts.php';
100
 
101
 
102
  /*
includes/admin/blocks/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
includes/admin/blocks/related-posts.php ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Functions to register client-side assets (scripts and stylesheets) for the
4
+ * Gutenberg block.
5
+ *
6
+ * @package Contextual_Related_Posts
7
+ */
8
+
9
+ /**
10
+ * Renders the `contextual-related-posts/related-posts` block on server.
11
+ *
12
+ * @since 2.8.0
13
+ * @param array $attributes The block attributes.
14
+ *
15
+ * @return string Returns the post content with latest posts added.
16
+ */
17
+ function render_crp_block( $attributes ) {
18
+
19
+ $attributes['extra_class'] = $attributes['className'];
20
+
21
+ $arguments = array_merge(
22
+ $attributes,
23
+ array(
24
+ 'is_block' => 1,
25
+ )
26
+ );
27
+
28
+ $arguments = wp_parse_args( $attributes['other_attributes'], $arguments );
29
+
30
+ /**
31
+ * Filters arguments passed to get_crp for the block.
32
+ *
33
+ * @since 2.8.0
34
+ *
35
+ * @param array $arguments CRP block options array.
36
+ * @param array $attributes Block attributes array.
37
+ */
38
+ $arguments = apply_filters( 'crp_block_options', $arguments, $attributes );
39
+
40
+ return get_crp( $arguments );
41
+ }
42
+
43
+ /**
44
+ * Registers all block assets so that they can be enqueued through Gutenberg in
45
+ * the corresponding context.
46
+ *
47
+ * @since 2.8.0
48
+ */
49
+ function crp_block_init() {
50
+ // Skip block registration if Gutenberg is not enabled/merged.
51
+ if ( ! function_exists( 'register_block_type' ) ) {
52
+ return;
53
+ }
54
+ $dir = dirname( __FILE__ );
55
+
56
+ $index_js = 'related-posts/index.min.js';
57
+ wp_register_script( // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter
58
+ 'related-posts-block-editor',
59
+ plugins_url( $index_js, __FILE__ ),
60
+ array(
61
+ 'wp-blocks',
62
+ 'wp-i18n',
63
+ 'wp-element',
64
+ 'wp-components',
65
+ 'wp-block-editor',
66
+ 'wp-editor',
67
+ ),
68
+ filemtime( "$dir/$index_js" )
69
+ );
70
+
71
+ // Localize the script with new data.
72
+ $localized_variables = array(
73
+ 'orderings' => crp_get_orderings(),
74
+ );
75
+ wp_localize_script( 'related-posts-block-editor', 'crp_php_variables', $localized_variables );
76
+
77
+ if ( 'rounded_thumbs' === crp_get_option( 'crp_styles' ) ) {
78
+
79
+ $thumb_width = crp_get_option( 'thumb_width' );
80
+ $thumb_height = crp_get_option( 'thumb_height' );
81
+
82
+ wp_register_style(
83
+ 'related-posts-block-editor',
84
+ plugins_url( 'css/default-style.css', CRP_PLUGIN_FILE ),
85
+ array( 'wp-edit-blocks' ),
86
+ '1.0'
87
+ );
88
+ $custom_css = "
89
+ .crp_related a {
90
+ width: {$thumb_width}px;
91
+ height: {$thumb_height}px;
92
+ text-decoration: none;
93
+ }
94
+ .crp_related img {
95
+ max-width: {$thumb_width}px;
96
+ margin: auto;
97
+ }
98
+ .crp_related .crp_title {
99
+ width: 100%;
100
+ }
101
+ ";
102
+
103
+ wp_add_inline_style( 'related-posts-block-editor', $custom_css );
104
+ }
105
+
106
+ register_block_type(
107
+ 'contextual-related-posts/related-posts',
108
+ array(
109
+ 'editor_script' => 'related-posts-block-editor',
110
+ 'editor_style' => 'related-posts-block-editor',
111
+ 'render_callback' => 'render_crp_block',
112
+ 'attributes' => array(
113
+ 'className' => array(
114
+ 'type' => 'string',
115
+ 'default' => '',
116
+ ),
117
+ 'heading' => array(
118
+ 'type' => 'boolean',
119
+ 'default' => false,
120
+ ),
121
+ 'limit' => array(
122
+ 'type' => 'number',
123
+ 'default' => 6,
124
+ ),
125
+ 'offset' => array(
126
+ 'type' => 'number',
127
+ 'default' => 0,
128
+ ),
129
+ 'show_excerpt' => array(
130
+ 'type' => 'boolean',
131
+ 'default' => false,
132
+ ),
133
+ 'show_author' => array(
134
+ 'type' => 'boolean',
135
+ 'default' => false,
136
+ ),
137
+ 'show_date' => array(
138
+ 'type' => 'boolean',
139
+ 'default' => false,
140
+ ),
141
+ 'post_thumb_op' => array(
142
+ 'type' => 'string',
143
+ 'default' => 'inline',
144
+ ),
145
+ 'ordering' => array(
146
+ 'type' => 'string',
147
+ 'default' => 'relevance',
148
+ ),
149
+ 'random_order' => array(
150
+ 'type' => 'boolean',
151
+ 'default' => false,
152
+ ),
153
+ 'other_attributes' => array(
154
+ 'type' => 'string',
155
+ 'default' => '',
156
+ ),
157
+ ),
158
+ )
159
+ );
160
+
161
+ if ( function_exists( 'wp_set_script_translations' ) ) {
162
+ wp_set_script_translations( 'related-posts-block-editor', 'contextual-related-posts' );
163
+ }
164
+ }
165
+ add_action( 'init', 'crp_block_init' );
includes/admin/blocks/related-posts/index.js ADDED
@@ -0,0 +1,227 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( blocks, i18n, element, components, editor, blockEditor ) {
2
+ var el = element.createElement;
3
+ const {registerBlockType} = blocks;
4
+ const {__} = i18n; //translation functions
5
+ var ServerSideRender = wp.serverSideRender;
6
+
7
+ const { RichText, InspectorControls } = blockEditor;
8
+ const {
9
+ TextControl,
10
+ CheckboxControl,
11
+ RadioControl,
12
+ SelectControl,
13
+ TextareaControl,
14
+ ToggleControl,
15
+ RangeControl,
16
+ Panel,
17
+ PanelBody,
18
+ PanelRow,
19
+ } = components;
20
+
21
+ registerBlockType( 'contextual-related-posts/related-posts', {
22
+ title: __( 'Related Posts [CRP]', 'contextual-related-posts' ),
23
+ description: __( 'Display related posts by Contextual Related Posts', 'contextual-related-posts' ),
24
+ category: 'widgets',
25
+ icon: 'list-view',
26
+ keywords: [ __( 'related posts' ), __( 'contextual' ), __( 'posts' ) ],
27
+
28
+ attributes: {
29
+ heading: {
30
+ type: 'boolean',
31
+ default: false,
32
+ },
33
+ limit: {
34
+ type: 'number',
35
+ default: 6,
36
+ },
37
+ offset: {
38
+ type: 'number',
39
+ default: 0,
40
+ },
41
+ show_excerpt: {
42
+ type: 'boolean',
43
+ default: false,
44
+ },
45
+ show_author: {
46
+ type: 'boolean',
47
+ default: false,
48
+ },
49
+ show_date: {
50
+ type: 'boolean',
51
+ default: false,
52
+ },
53
+ post_thumb_op: {
54
+ type: 'string',
55
+ default: 'inline',
56
+ },
57
+ ordering: {
58
+ type: 'string',
59
+ default: 'relevance',
60
+ },
61
+ random_order: {
62
+ type: 'boolean',
63
+ default: false,
64
+ },
65
+ other_attributes: {
66
+ type: 'string',
67
+ default: '',
68
+ },
69
+ },
70
+
71
+ supports: {
72
+ html: false,
73
+ },
74
+
75
+ example: { },
76
+
77
+ edit: function( props ) {
78
+ const attributes = props.attributes;
79
+ const setAttributes = props.setAttributes;
80
+
81
+ var orderings = Object.keys(crp_php_variables.orderings).map(function(key) {
82
+ return {value: key, label: crp_php_variables.orderings[key]};
83
+ });
84
+
85
+ if(props.isSelected){
86
+ // console.debug(props.attributes);
87
+ };
88
+
89
+
90
+ // Functions to update attributes.
91
+ function changeHeading(heading){
92
+ setAttributes({heading});
93
+ }
94
+
95
+ function changeExcerpt(show_excerpt){
96
+ setAttributes({show_excerpt});
97
+ }
98
+
99
+ function changeAuthor(show_author){
100
+ setAttributes({show_author});
101
+ }
102
+
103
+ function changeDate(show_date){
104
+ setAttributes({show_date});
105
+ }
106
+
107
+ function changeThumbnail(post_thumb_op){
108
+ setAttributes({post_thumb_op});
109
+ }
110
+
111
+ function changeOrdering(ordering){
112
+ setAttributes({ordering});
113
+ }
114
+
115
+ function changeRandomOrder(random_order){
116
+ setAttributes({random_order});
117
+ }
118
+
119
+ function changeOtherAttributes(other_attributes){
120
+ setAttributes({other_attributes});
121
+ }
122
+
123
+ return [
124
+ /**
125
+ * Server side render
126
+ */
127
+ el("div", { className: props.className },
128
+ el( ServerSideRender, {
129
+ block: 'contextual-related-posts/related-posts',
130
+ attributes: attributes
131
+ } )
132
+ ),
133
+
134
+ /**
135
+ * Inspector
136
+ */
137
+ el( InspectorControls, {},
138
+ el( PanelBody, { title: 'Related Posts Settings', initialOpen: true },
139
+
140
+ el( ToggleControl, {
141
+ label: __( 'Show heading', 'contextual-related-posts' ),
142
+ checked: attributes.heading,
143
+ onChange: changeHeading
144
+ } ),
145
+ el( TextControl, {
146
+ label: __( 'No. of posts', 'contextual-related-posts' ),
147
+ value: attributes.limit,
148
+ onChange: function( val ) {
149
+ setAttributes( { limit: parseInt( val ) } );
150
+ },
151
+ type: 'number',
152
+ min: 1,
153
+ step: 1
154
+ } ),
155
+
156
+ el( TextControl, {
157
+ label: __( 'Offset', 'contextual-related-posts' ),
158
+ value: attributes.offset,
159
+ onChange: function( val ) {
160
+ setAttributes( { offset: parseInt( val ) } );
161
+ },
162
+ type: 'number',
163
+ min: 0,
164
+ step: 1
165
+ }),
166
+
167
+ el( ToggleControl, {
168
+ label: __( 'Show excerpt', 'contextual-related-posts' ),
169
+ checked: attributes.show_excerpt,
170
+ onChange: changeExcerpt
171
+ } ),
172
+ el( ToggleControl, {
173
+ label: __( 'Show author', 'contextual-related-posts' ),
174
+ checked: attributes.show_author,
175
+ onChange: changeAuthor
176
+ } ),
177
+ el( ToggleControl, {
178
+ label: __( 'Show date', 'contextual-related-posts' ),
179
+ checked: attributes.show_date,
180
+ onChange: changeDate
181
+ } ),
182
+ el(SelectControl, {
183
+ value: attributes.post_thumb_op,
184
+ label: __( 'Thumbnail options', 'contextual-related-posts' ),
185
+ onChange: changeThumbnail,
186
+ options: [
187
+ {value: 'inline', label: __( 'Before title', 'contextual-related-posts' )},
188
+ {value: 'after', label: __( 'After title', 'contextual-related-posts' )},
189
+ {value: 'thumbs_only', label: __( 'Only thumbnail', 'contextual-related-posts' )},
190
+ {value: 'text_only', label: __( 'Only text', 'contextual-related-posts' )},
191
+ ]
192
+ } ),
193
+ el(RadioControl, {
194
+ selected: attributes.ordering,
195
+ label: __( 'Ordering', 'contextual-related-posts' ),
196
+ onChange: changeOrdering,
197
+ options: orderings
198
+ } ),
199
+ el( ToggleControl, {
200
+ label: __( 'Randomize posts', 'contextual-related-posts' ),
201
+ checked: attributes.random_order,
202
+ onChange: changeRandomOrder
203
+ } ),
204
+ el( TextareaControl, {
205
+ label: __( 'Other attributes', 'contextual-related-posts' ),
206
+ help: __( 'Enter other attributes in a URL-style string-query. e.g. post_types=post,page&link_nofollow=1&exclude_post_ids=5,6', 'contextual-related-posts' ),
207
+ value: attributes.other_attributes,
208
+ onChange: changeOtherAttributes
209
+ } )
210
+ ),
211
+ ),
212
+ ]
213
+ },
214
+
215
+ save(){
216
+ return null;//save has to exist. This all we need
217
+ }
218
+ } );
219
+ } )(
220
+ window.wp.blocks,
221
+ window.wp.i18n,
222
+ window.wp.element,
223
+ window.wp.components,
224
+ window.wp.editor,
225
+ window.wp.blockEditor,
226
+ window.wp.serverSideRender
227
+ );
includes/admin/blocks/related-posts/index.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(blocks,i18n,element,components,editor,blockEditor){var el=element.createElement;const{registerBlockType:registerBlockType}=blocks,{__:__}=i18n;var ServerSideRender=wp.serverSideRender;const{RichText:RichText,InspectorControls:InspectorControls}=blockEditor,{TextControl:TextControl,CheckboxControl:CheckboxControl,RadioControl:RadioControl,SelectControl:SelectControl,TextareaControl:TextareaControl,ToggleControl:ToggleControl,RangeControl:RangeControl,Panel:Panel,PanelBody:PanelBody,PanelRow:PanelRow}=components;registerBlockType("contextual-related-posts/related-posts",{title:__("Related Posts [CRP]","contextual-related-posts"),description:__("Display related posts by Contextual Related Posts","contextual-related-posts"),category:"widgets",icon:"list-view",keywords:[__("related posts"),__("contextual"),__("posts")],attributes:{heading:{type:"boolean",default:!1},limit:{type:"number",default:6},offset:{type:"number",default:0},show_excerpt:{type:"boolean",default:!1},show_author:{type:"boolean",default:!1},show_date:{type:"boolean",default:!1},post_thumb_op:{type:"string",default:"inline"},ordering:{type:"string",default:"relevance"},random_order:{type:"boolean",default:!1},other_attributes:{type:"string",default:""}},supports:{html:!1},example:{},edit:function(props){const attributes=props.attributes,setAttributes=props.setAttributes;var orderings=Object.keys(crp_php_variables.orderings).map((function(key){return{value:key,label:crp_php_variables.orderings[key]}}));function changeHeading(heading){setAttributes({heading:heading})}function changeExcerpt(show_excerpt){setAttributes({show_excerpt:show_excerpt})}function changeAuthor(show_author){setAttributes({show_author:show_author})}function changeDate(show_date){setAttributes({show_date:show_date})}function changeThumbnail(post_thumb_op){setAttributes({post_thumb_op:post_thumb_op})}function changeOrdering(ordering){setAttributes({ordering:ordering})}function changeRandomOrder(random_order){setAttributes({random_order:random_order})}function changeOtherAttributes(other_attributes){setAttributes({other_attributes:other_attributes})}return props.isSelected,[el("div",{className:props.className},el(ServerSideRender,{block:"contextual-related-posts/related-posts",attributes:attributes})),el(InspectorControls,{},el(PanelBody,{title:"Related Posts Settings",initialOpen:!0},el(ToggleControl,{label:__("Show heading","contextual-related-posts"),checked:attributes.heading,onChange:changeHeading}),el(TextControl,{label:__("No. of posts","contextual-related-posts"),value:attributes.limit,onChange:function(val){setAttributes({limit:parseInt(val)})},type:"number",min:1,step:1}),el(TextControl,{label:__("Offset","contextual-related-posts"),value:attributes.offset,onChange:function(val){setAttributes({offset:parseInt(val)})},type:"number",min:0,step:1}),el(ToggleControl,{label:__("Show excerpt","contextual-related-posts"),checked:attributes.show_excerpt,onChange:changeExcerpt}),el(ToggleControl,{label:__("Show author","contextual-related-posts"),checked:attributes.show_author,onChange:changeAuthor}),el(ToggleControl,{label:__("Show date","contextual-related-posts"),checked:attributes.show_date,onChange:changeDate}),el(SelectControl,{value:attributes.post_thumb_op,label:__("Thumbnail options","contextual-related-posts"),onChange:changeThumbnail,options:[{value:"inline",label:__("Before title","contextual-related-posts")},{value:"after",label:__("After title","contextual-related-posts")},{value:"thumbs_only",label:__("Only thumbnail","contextual-related-posts")},{value:"text_only",label:__("Only text","contextual-related-posts")}]}),el(RadioControl,{selected:attributes.ordering,label:__("Ordering","contextual-related-posts"),onChange:changeOrdering,options:orderings}),el(ToggleControl,{label:__("Randomize posts","contextual-related-posts"),checked:attributes.random_order,onChange:changeRandomOrder}),el(TextareaControl,{label:__("Other attributes","contextual-related-posts"),help:__("Enter other attributes in a URL-style string-query. e.g. post_types=post,page&link_nofollow=1&exclude_post_ids=5,6","contextual-related-posts"),value:attributes.other_attributes,onChange:changeOtherAttributes})))]},save:()=>null})}(window.wp.blocks,window.wp.i18n,window.wp.element,window.wp.components,window.wp.editor,window.wp.blockEditor,window.wp.serverSideRender);
includes/admin/blocks/related-posts/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
includes/admin/default-settings.php CHANGED
@@ -357,11 +357,7 @@ function crp_settings_list() {
357
  'desc' => '',
358
  'type' => 'radio',
359
  'default' => 'relevance',
360
- 'options' => array(
361
- 'relevance' => esc_html__( 'By relevance', 'contextual-related-posts' ),
362
- 'random' => esc_html__( 'Randomly', 'contextual-related-posts' ),
363
- 'date' => esc_html__( 'By date', 'contextual-related-posts' ),
364
- ),
365
  ),
366
  'random_order' => array(
367
  'id' => 'random_order',
@@ -767,3 +763,27 @@ function crp_get_styles() {
767
  */
768
  return apply_filters( 'crp_get_styles', $styles );
769
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
  'desc' => '',
358
  'type' => 'radio',
359
  'default' => 'relevance',
360
+ 'options' => crp_get_orderings(),
 
 
 
 
361
  ),
362
  'random_order' => array(
363
  'id' => 'random_order',
763
  */
764
  return apply_filters( 'crp_get_styles', $styles );
765
  }
766
+
767
+ /**
768
+ * Get the various order settings.
769
+ *
770
+ * @since 2.8.0
771
+ * @return array Order settings.
772
+ */
773
+ function crp_get_orderings() {
774
+
775
+ $orderings = array(
776
+ 'relevance' => esc_html__( 'By relevance', 'contextual-related-posts' ),
777
+ 'random' => esc_html__( 'Randomly', 'contextual-related-posts' ),
778
+ 'date' => esc_html__( 'By date', 'contextual-related-posts' ),
779
+ );
780
+
781
+ /**
782
+ * Filter the array containing the order settings.
783
+ *
784
+ * @since 2.8.0
785
+ *
786
+ * @param string $orderings Order settings.
787
+ */
788
+ return apply_filters( 'crp_get_orderings', $orderings );
789
+ }
includes/admin/modules/cache.php CHANGED
@@ -105,6 +105,7 @@ function crp_cache_get_keys() {
105
  'crp_related_posts_feed',
106
  'crp_related_posts_widget_feed',
107
  'crp_related_posts_manual',
 
108
  );
109
 
110
  $meta_keys = array_merge( $meta_keys, crp_cache_get_meta_keys() );
@@ -167,7 +168,7 @@ function crp_delete_cache_post_save( $post_id ) {
167
  }
168
 
169
  // If our nonce isn't there, or we can't verify it, bail.
170
- if ( ! isset( $_POST['crp_meta_box_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['crp_meta_box_nonce'] ), 'crp_meta_box' ) ) { // Input var okay.
171
  return;
172
  }
173
 
@@ -183,6 +184,5 @@ function crp_delete_cache_post_save( $post_id ) {
183
  }
184
 
185
  }
186
- add_action( 'save_post', 'crp_delete_cache_post_save' );
187
- add_action( 'edit_attachment', 'crp_delete_cache_post_save' );
188
 
105
  'crp_related_posts_feed',
106
  'crp_related_posts_widget_feed',
107
  'crp_related_posts_manual',
108
+ 'crp_related_posts_block',
109
  );
110
 
111
  $meta_keys = array_merge( $meta_keys, crp_cache_get_meta_keys() );
168
  }
169
 
170
  // If our nonce isn't there, or we can't verify it, bail.
171
+ if ( ! isset( $_POST['crp_meta_box_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['crp_meta_box_nonce'] ), 'crp_meta_box' ) ) {
172
  return;
173
  }
174
 
184
  }
185
 
186
  }
187
+ add_action( 'crp_save_meta_box', 'crp_delete_cache_post_save' );
 
188
 
includes/admin/modules/metabox.php CHANGED
@@ -103,6 +103,13 @@ function crp_call_meta_box() {
103
  }
104
  $manual_related_array = explode( ',', $manual_related );
105
 
 
 
 
 
 
 
 
106
  ?>
107
  <p>
108
  <label for="crp_disable_here"><strong><?php esc_html_e( 'Disable Related Posts display:', 'contextual-related-posts' ); ?></strong></label>
@@ -118,6 +125,12 @@ function crp_call_meta_box() {
118
  <em><?php esc_html_e( 'If this is checked, then this post will be excluded from the popular posts list.', 'contextual-related-posts' ); ?></em>
119
  </p>
120
 
 
 
 
 
 
 
121
  <p>
122
  <label for="manual_related"><strong><?php esc_html_e( 'Manual related posts:', 'contextual-related-posts' ); ?></strong></label>
123
  <input type="text" id="manual_related" name="manual_related" value="<?php echo esc_attr( $manual_related ); ?>" style="width:100%" />
@@ -217,18 +230,22 @@ function crp_save_meta_box( $post_id ) {
217
  }
218
 
219
  // Disable posts.
220
- if ( isset( $_POST['crp_disable_here'] ) ) { // Input var okay.
221
  $crp_post_meta['crp_disable_here'] = 1;
222
  } else {
223
  $crp_post_meta['crp_disable_here'] = 0;
224
  }
225
 
226
- if ( isset( $_POST['crp_exclude_this_post'] ) ) { // Input var okay.
227
  $crp_post_meta['exclude_this_post'] = 1;
228
  } else {
229
  $crp_post_meta['exclude_this_post'] = 0;
230
  }
231
 
 
 
 
 
232
  // Save Manual related posts.
233
  if ( isset( $_POST['manual_related'] ) ) {
234
 
@@ -261,12 +278,6 @@ function crp_save_meta_box( $post_id ) {
261
  update_post_meta( $post_id, 'crp_post_meta', $crp_post_meta_filtered );
262
  }
263
 
264
- // Clear cache of current post.
265
- $default_meta_keys = crp_cache_get_keys();
266
- foreach ( $default_meta_keys as $meta_key ) {
267
- delete_post_meta( $post_id, $meta_key );
268
- }
269
-
270
  /**
271
  * Action triggered when saving Contextual Related Posts meta box settings
272
  *
103
  }
104
  $manual_related_array = explode( ',', $manual_related );
105
 
106
+ // Keyword - word or phrase.
107
+ if ( isset( $crp_post_meta['keyword'] ) ) {
108
+ $keyword = $crp_post_meta['keyword'];
109
+ } else {
110
+ $keyword = '';
111
+ }
112
+
113
  ?>
114
  <p>
115
  <label for="crp_disable_here"><strong><?php esc_html_e( 'Disable Related Posts display:', 'contextual-related-posts' ); ?></strong></label>
125
  <em><?php esc_html_e( 'If this is checked, then this post will be excluded from the popular posts list.', 'contextual-related-posts' ); ?></em>
126
  </p>
127
 
128
+ <p>
129
+ <label for="keyword"><strong><?php esc_html_e( 'Keyword:', 'contextual-related-posts' ); ?></strong></label>
130
+ <textarea class="large-text" cols="50" rows="5" id="crp_keyword" name="crp_keyword"><?php echo esc_textarea( stripslashes( $keyword ) ); ?></textarea>
131
+ <em><?php esc_html_e( 'Enter either a word or a phrase that will be used to find related posts. If entered, the plugin will continue to search the `post_title` and `post_content` fields but will use this keyword instead of the values of the title and content of this post.', 'contextual-related-posts' ); ?></em>
132
+ </p>
133
+
134
  <p>
135
  <label for="manual_related"><strong><?php esc_html_e( 'Manual related posts:', 'contextual-related-posts' ); ?></strong></label>
136
  <input type="text" id="manual_related" name="manual_related" value="<?php echo esc_attr( $manual_related ); ?>" style="width:100%" />
230
  }
231
 
232
  // Disable posts.
233
+ if ( isset( $_POST['crp_disable_here'] ) ) {
234
  $crp_post_meta['crp_disable_here'] = 1;
235
  } else {
236
  $crp_post_meta['crp_disable_here'] = 0;
237
  }
238
 
239
+ if ( isset( $_POST['crp_exclude_this_post'] ) ) {
240
  $crp_post_meta['exclude_this_post'] = 1;
241
  } else {
242
  $crp_post_meta['exclude_this_post'] = 0;
243
  }
244
 
245
+ if ( isset( $_POST['crp_keyword'] ) ) {
246
+ $crp_post_meta['keyword'] = sanitize_text_field( wp_unslash( $_POST['crp_keyword'] ) );
247
+ }
248
+
249
  // Save Manual related posts.
250
  if ( isset( $_POST['manual_related'] ) ) {
251
 
278
  update_post_meta( $post_id, 'crp_post_meta', $crp_post_meta_filtered );
279
  }
280
 
 
 
 
 
 
 
281
  /**
282
  * Action triggered when saving Contextual Related Posts meta box settings
283
  *
includes/admin/save-settings.php CHANGED
@@ -337,9 +337,9 @@ function crp_change_settings_on_save( $settings ) {
337
 
338
  // Overwrite settings if rounded thumbnail style is selected.
339
  if ( 'rounded_thumbs' === $settings['crp_styles'] ) {
340
- $settings['show_excerpt'] = 0;
341
- $settings['show_author'] = 0;
342
- $settings['show_date'] = 0;
343
 
344
  if ( 'inline' !== $settings['post_thumb_op'] && 'thumbs_only' !== $settings['post_thumb_op'] ) {
345
  $settings['post_thumb_op'] = 'inline';
337
 
338
  // Overwrite settings if rounded thumbnail style is selected.
339
  if ( 'rounded_thumbs' === $settings['crp_styles'] ) {
340
+ $settings['show_excerpt'] = 0;
341
+ $settings['show_author'] = 0;
342
+ $settings['show_date'] = 0;
343
 
344
  if ( 'inline' !== $settings['post_thumb_op'] && 'thumbs_only' !== $settings['post_thumb_op'] ) {
345
  $settings['post_thumb_op'] = 'inline';
includes/admin/settings-page.php CHANGED
@@ -750,3 +750,29 @@ function crp_admin_thumbnail( $html, $args ) {
750
  }
751
  add_filter( 'crp_after_setting_output', 'crp_admin_thumbnail', 10, 2 );
752
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
750
  }
751
  add_filter( 'crp_after_setting_output', 'crp_admin_thumbnail', 10, 2 );
752
 
753
+
754
+ /**
755
+ * Output messages when a specific style is selected.
756
+ *
757
+ * @since 2.8.0
758
+ *
759
+ * @param string $html Current HTML.
760
+ * @param array $args Argument array of the setting.
761
+ * @return string
762
+ */
763
+ function crp_styles_messages( $html, $args ) {
764
+
765
+ $crp_styles = crp_get_option( 'crp_styles' );
766
+
767
+ if ( 'rounded_thumbs' === $crp_styles && ( 'show_excerpt' === $args['id'] || 'show_author' === $args['id'] || 'show_date' === $args['id'] ) ) {
768
+ $html .= '<span style="color:red">' . esc_html__( 'This option cannot be changed because of the selected related posts style. To modify this option, you will need to select No styles or Text only in the Styles tab', 'contextual-related-posts' ) . '</span>';
769
+ }
770
+
771
+ if ( ( 'rounded_thumbs' === $crp_styles || 'text_only' === $crp_styles ) && 'post_thumb_op' === $args['id'] ) {
772
+ $html .= '<span style="color:red">' . esc_html__( 'This option cannot be changed because of the selected related posts style. To modify this option, you will need to select No styles in the Styles tab', 'contextual-related-posts' ) . '</span>';
773
+ }
774
+
775
+ return $html;
776
+ }
777
+ add_filter( 'crp_after_setting_output', 'crp_styles_messages', 10, 2 );
778
+
includes/main-query.php CHANGED
@@ -34,9 +34,11 @@ function get_crp( $args = array() ) {
34
  'is_widget' => false,
35
  'is_shortcode' => false,
36
  'is_manual' => false,
 
37
  'echo' => true,
38
  'heading' => true,
39
  'offset' => 0,
 
40
  );
41
  $defaults = array_merge( $defaults, $crp_settings );
42
 
@@ -49,7 +51,7 @@ function get_crp( $args = array() ) {
49
  }
50
 
51
  // Support caching to speed up retrieval.
52
- if ( ! empty( $args['cache'] ) && empty( $args['cache_posts'] ) ) {
53
  $meta_key = 'crp_related_posts';
54
  if ( $args['is_widget'] ) {
55
  $meta_key .= '_widget';
@@ -57,6 +59,9 @@ function get_crp( $args = array() ) {
57
  if ( $args['is_manual'] ) {
58
  $meta_key .= '_manual';
59
  }
 
 
 
60
  if ( is_feed() ) {
61
  $meta_key .= '_feed';
62
  }
@@ -89,16 +94,17 @@ function get_crp( $args = array() ) {
89
  */
90
  $custom_template = apply_filters( 'crp_custom_template', null, $results, $args );
91
  if ( ! empty( $custom_template ) ) {
92
- if ( ! empty( $args['cache'] ) && empty( $args['cache_posts'] ) ) {
93
  update_post_meta( $post->ID, $meta_key, $custom_template, '' );
94
  }
95
  return $custom_template;
96
  }
97
 
98
- $widget_class = $args['is_widget'] ? 'crp_related_widget' : 'crp_related ';
99
  $shortcode_class = $args['is_shortcode'] ? 'crp_related_shortcode ' : '';
 
100
 
101
- $post_classes = $widget_class . $shortcode_class;
102
 
103
  /**
104
  * Filter the classes added to the div wrapper of the Contextual Related Posts.
@@ -224,7 +230,7 @@ function get_crp( $args = array() ) {
224
  $output .= '</div>'; // Closing div of 'crp_related'.
225
 
226
  // Support caching to speed up retrieval.
227
- if ( ! empty( $args['cache'] ) && empty( $args['cache_posts'] ) ) {
228
  update_post_meta( $post->ID, $meta_key, $output, '' );
229
  }
230
 
@@ -246,7 +252,7 @@ function get_crp( $args = array() ) {
246
  * @since 1.9
247
  *
248
  * @param array $args Arguments array.
249
- * @return object $results
250
  */
251
  function get_crp_posts_id( $args = array() ) {
252
  global $wpdb, $post, $crp_settings;
@@ -349,6 +355,15 @@ function get_crp_posts_id( $args = array() ) {
349
  $match_fields_content[] = crp_excerpt( $source_post->ID, $args['match_content_words'], false );
350
  }
351
 
 
 
 
 
 
 
 
 
 
352
  /**
353
  * Filter the fields that are to be matched.
354
  *
@@ -378,7 +393,7 @@ function get_crp_posts_id( $args = array() ) {
378
  $now = gmdate( 'Y-m-d H:i:s', ( time() + ( $time_difference * 3600 ) ) );
379
 
380
  // Limit the related posts by time.
381
- $current_time = current_time( 'timestamp', 0 );
382
  $from_date = $current_time - ( absint( $args['daily_range'] ) * DAY_IN_SECONDS );
383
  $from_date = gmdate( 'Y-m-d H:i:s', $from_date );
384
 
@@ -390,7 +405,7 @@ function get_crp_posts_id( $args = array() ) {
390
 
391
  // Set order by in case of date.
392
  if ( isset( $args['ordering'] ) && 'date' === $args['ordering'] ) {
393
- $orderby = " $wpdb->posts.post_date ";
394
  }
395
 
396
  // Create the base MATCH clause.
@@ -437,7 +452,7 @@ function get_crp_posts_id( $args = array() ) {
437
  $where = $match;
438
  $where .= $now_clause;
439
  $where .= $from_clause;
440
- $where .= " AND $wpdb->posts.post_status = 'publish' "; // Only show published posts.
441
  $where .= $wpdb->prepare( " AND {$wpdb->posts}.ID != %d ", $source_post->ID ); // Don't include the current ID.
442
 
443
  if ( isset( $args['same_author'] ) && $args['same_author'] ) {
@@ -457,7 +472,7 @@ function get_crp_posts_id( $args = array() ) {
457
  $exclude_post_ids = apply_filters( 'crp_exclude_post_ids', $exclude_post_ids );
458
 
459
  // Convert it back to string.
460
- $exclude_post_ids = implode( ',', array_filter( $exclude_post_ids ) );
461
 
462
  if ( '' != $exclude_post_ids ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
463
  $where .= " AND $wpdb->posts.ID NOT IN ({$exclude_post_ids}) ";
@@ -553,7 +568,7 @@ function get_crp_posts_id( $args = array() ) {
553
  $sql = "SELECT DISTINCT $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $having $orderby $limits";
554
 
555
  // Support caching to speed up retrieval.
556
- if ( ! empty( $args['cache_posts'] ) ) {
557
 
558
  $attr = array(
559
  'offset' => $offset,
@@ -575,7 +590,7 @@ function get_crp_posts_id( $args = array() ) {
575
  }
576
 
577
  // Support caching to speed up retrieval.
578
- if ( ! empty( $args['cache_posts'] ) ) {
579
  update_post_meta( $post->ID, $meta_key, $results, '' );
580
  }
581
 
@@ -602,6 +617,8 @@ function get_crp_posts_id( $args = array() ) {
602
  /**
603
  * Get the meta key based on a list of parameters.
604
  *
 
 
605
  * @param array $attr Array of attributes.
606
  * @return string Cache meta key
607
  */
34
  'is_widget' => false,
35
  'is_shortcode' => false,
36
  'is_manual' => false,
37
+ 'is_block' => false,
38
  'echo' => true,
39
  'heading' => true,
40
  'offset' => 0,
41
+ 'extra_class' => '',
42
  );
43
  $defaults = array_merge( $defaults, $crp_settings );
44
 
51
  }
52
 
53
  // Support caching to speed up retrieval.
54
+ if ( ! empty( $args['cache'] ) && empty( $args['cache_posts'] ) && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
55
  $meta_key = 'crp_related_posts';
56
  if ( $args['is_widget'] ) {
57
  $meta_key .= '_widget';
59
  if ( $args['is_manual'] ) {
60
  $meta_key .= '_manual';
61
  }
62
+ if ( $args['is_block'] ) {
63
+ $meta_key .= '_block';
64
+ }
65
  if ( is_feed() ) {
66
  $meta_key .= '_feed';
67
  }
94
  */
95
  $custom_template = apply_filters( 'crp_custom_template', null, $results, $args );
96
  if ( ! empty( $custom_template ) ) {
97
+ if ( ! empty( $args['cache'] ) && empty( $args['cache_posts'] ) && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
98
  update_post_meta( $post->ID, $meta_key, $custom_template, '' );
99
  }
100
  return $custom_template;
101
  }
102
 
103
+ $widget_class = $args['is_widget'] ? 'crp_related_widget ' : 'crp_related ';
104
  $shortcode_class = $args['is_shortcode'] ? 'crp_related_shortcode ' : '';
105
+ $block_class = $args['is_block'] ? 'crp_related_block ' : '';
106
 
107
+ $post_classes = $widget_class . $shortcode_class . $block_class . ' ' . $args['extra_class'];
108
 
109
  /**
110
  * Filter the classes added to the div wrapper of the Contextual Related Posts.
230
  $output .= '</div>'; // Closing div of 'crp_related'.
231
 
232
  // Support caching to speed up retrieval.
233
+ if ( ! empty( $args['cache'] ) && empty( $args['cache_posts'] ) && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
234
  update_post_meta( $post->ID, $meta_key, $output, '' );
235
  }
236
 
252
  * @since 1.9
253
  *
254
  * @param array $args Arguments array.
255
+ * @return object $results Array of related post objects
256
  */
257
  function get_crp_posts_id( $args = array() ) {
258
  global $wpdb, $post, $crp_settings;
355
  $match_fields_content[] = crp_excerpt( $source_post->ID, $args['match_content_words'], false );
356
  }
357
 
358
+ // If keyword is entered, override the matching content.
359
+ $crp_post_meta = get_post_meta( $post->ID, 'crp_post_meta', true );
360
+
361
+ if ( isset( $crp_post_meta['keyword'] ) ) {
362
+ $match_fields_content = array(
363
+ $crp_post_meta['keyword'],
364
+ );
365
+ }
366
+
367
  /**
368
  * Filter the fields that are to be matched.
369
  *
393
  $now = gmdate( 'Y-m-d H:i:s', ( time() + ( $time_difference * 3600 ) ) );
394
 
395
  // Limit the related posts by time.
396
+ $current_time = strtotime( current_time( 'mysql' ) );
397
  $from_date = $current_time - ( absint( $args['daily_range'] ) * DAY_IN_SECONDS );
398
  $from_date = gmdate( 'Y-m-d H:i:s', $from_date );
399
 
405
 
406
  // Set order by in case of date.
407
  if ( isset( $args['ordering'] ) && 'date' === $args['ordering'] ) {
408
+ $orderby = " $wpdb->posts.post_date DESC ";
409
  }
410
 
411
  // Create the base MATCH clause.
452
  $where = $match;
453
  $where .= $now_clause;
454
  $where .= $from_clause;
455
+ $where .= " AND $wpdb->posts.post_status IN ('publish','inherit') "; // Only show published posts or attachments.
456
  $where .= $wpdb->prepare( " AND {$wpdb->posts}.ID != %d ", $source_post->ID ); // Don't include the current ID.
457
 
458
  if ( isset( $args['same_author'] ) && $args['same_author'] ) {
472
  $exclude_post_ids = apply_filters( 'crp_exclude_post_ids', $exclude_post_ids );
473
 
474
  // Convert it back to string.
475
+ $exclude_post_ids = implode( ',', array_filter( array_filter( $exclude_post_ids, 'absint' ) ) );
476
 
477
  if ( '' != $exclude_post_ids ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
478
  $where .= " AND $wpdb->posts.ID NOT IN ({$exclude_post_ids}) ";
568
  $sql = "SELECT DISTINCT $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $having $orderby $limits";
569
 
570
  // Support caching to speed up retrieval.
571
+ if ( ! empty( $args['cache_posts'] ) && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
572
 
573
  $attr = array(
574
  'offset' => $offset,
590
  }
591
 
592
  // Support caching to speed up retrieval.
593
+ if ( ! empty( $args['cache_posts'] ) && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
594
  update_post_meta( $post->ID, $meta_key, $results, '' );
595
  }
596
 
617
  /**
618
  * Get the meta key based on a list of parameters.
619
  *
620
+ * @since 2.7.0
621
+ *
622
  * @param array $attr Array of attributes.
623
  * @return string Cache meta key
624
  */
includes/media.php CHANGED
@@ -101,7 +101,9 @@ function crp_get_the_post_thumbnail( $args = array() ) {
101
  // If there is no thumbnail found, check the post thumbnail.
102
  if ( ! $postimage ) {
103
  if ( false !== get_post_thumbnail_id( $result->ID ) ) {
104
- $postthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $result->ID ), array( $args['thumb_width'], $args['thumb_height'] ) );
 
 
105
  $postimage = $postthumb[0];
106
  }
107
  $pick = 'featured';
101
  // If there is no thumbnail found, check the post thumbnail.
102
  if ( ! $postimage ) {
103
  if ( false !== get_post_thumbnail_id( $result->ID ) ) {
104
+ $attachment_id = ( 'attachment' === $result->post_type ) ? $result->ID : get_post_thumbnail_id( $result->ID );
105
+
106
+ $postthumb = wp_get_attachment_image_src( $attachment_id, array( $args['thumb_width'], $args['thumb_height'] ) );
107
  $postimage = $postthumb[0];
108
  }
109
  $pick = 'featured';
includes/modules/class-crp-widget.php CHANGED
@@ -54,6 +54,8 @@ class CRP_Widget extends WP_Widget {
54
  $post_thumb_op = isset( $instance['post_thumb_op'] ) ? esc_attr( $instance['post_thumb_op'] ) : '';
55
  $thumb_height = isset( $instance['thumb_height'] ) ? esc_attr( $instance['thumb_height'] ) : '';
56
  $thumb_width = isset( $instance['thumb_width'] ) ? esc_attr( $instance['thumb_width'] ) : '';
 
 
57
 
58
  // Parse the Post types.
59
  $post_types = array();
@@ -72,6 +74,9 @@ class CRP_Widget extends WP_Widget {
72
  );
73
  $posts_types_inc = array_intersect( $wp_post_types, $post_types );
74
 
 
 
 
75
  ?>
76
  <p>
77
  <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
@@ -122,7 +127,23 @@ class CRP_Widget extends WP_Widget {
122
  <?php esc_html_e( 'Thumbnail width', 'contextual-related-posts' ); ?>: <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'thumb_width' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_width' ) ); ?>" type="text" value="<?php echo esc_attr( $thumb_width ); ?>" />
123
  </label>
124
  </p>
 
 
 
 
 
 
 
 
 
125
 
 
 
 
 
 
 
 
126
  <p><?php esc_html_e( 'Post types to include', 'contextual-related-posts' ); ?>:<br />
127
 
128
  <?php foreach ( $wp_post_types as $wp_post_type ) { ?>
@@ -172,6 +193,8 @@ class CRP_Widget extends WP_Widget {
172
  $instance['show_author'] = isset( $new_instance['show_author'] ) ? true : false;
173
  $instance['show_date'] = isset( $new_instance['show_date'] ) ? true : false;
174
  $instance['offset'] = ( ! empty( $new_instance['offset'] ) ) ? intval( $new_instance['offset'] ) : '';
 
 
175
 
176
  // Process post types to be selected.
177
  $wp_post_types = get_post_types(
@@ -206,7 +229,7 @@ class CRP_Widget extends WP_Widget {
206
  * @param array $instance Saved values from database.
207
  */
208
  public function widget( $args, $instance ) {
209
- global $post, $crp_settings;
210
 
211
  // Get the post meta.
212
  if ( isset( $post ) ) {
@@ -218,21 +241,21 @@ class CRP_Widget extends WP_Widget {
218
  }
219
 
220
  // If post_types is empty or contains a query string then use parse_str else consider it comma-separated.
221
- if ( ! empty( $crp_settings['exclude_on_post_types'] ) && false === strpos( $crp_settings['exclude_on_post_types'], '=' ) ) {
222
- $exclude_on_post_types = explode( ',', $crp_settings['exclude_on_post_types'] );
223
  } else {
224
- parse_str( $crp_settings['exclude_on_post_types'], $exclude_on_post_types ); // Save post types in $exclude_on_post_types variable.
225
  }
226
 
227
  if ( is_object( $post ) && ( in_array( $post->post_type, $exclude_on_post_types, true ) ) ) {
228
  return 0; // Exit without adding related posts.
229
  }
230
 
231
- $exclude_on_post_ids = explode( ',', $crp_settings['exclude_on_post_ids'] );
232
 
233
  if ( ( ( is_single() ) && ( ! is_single( $exclude_on_post_ids ) ) ) || ( ( is_page() ) && ( ! is_page( $exclude_on_post_ids ) ) ) ) {
234
 
235
- $title = empty( $instance['title'] ) ? wp_strip_all_tags( str_replace( '%postname%', $post->post_title, $crp_settings['title'] ) ) : $instance['title'];
236
 
237
  /**
238
  * Filters the widget title.
@@ -245,19 +268,21 @@ class CRP_Widget extends WP_Widget {
245
  */
246
  $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
247
 
248
- $limit = isset( $instance['limit'] ) ? $instance['limit'] : $crp_settings['limit'];
249
  if ( empty( $limit ) ) {
250
- $limit = $crp_settings['limit'];
251
  }
252
  $offset = isset( $instance['offset'] ) ? $instance['offset'] : 0;
253
 
254
  $post_thumb_op = isset( $instance['post_thumb_op'] ) ? esc_attr( $instance['post_thumb_op'] ) : 'text_only';
255
- $thumb_height = isset( $instance['thumb_height'] ) && ! empty( $instance['thumb_height'] ) ? esc_attr( $instance['thumb_height'] ) : $crp_settings['thumb_height'];
256
- $thumb_width = isset( $instance['thumb_width'] ) && ! empty( $instance['thumb_width'] ) ? esc_attr( $instance['thumb_width'] ) : $crp_settings['thumb_width'];
257
  $show_excerpt = isset( $instance['show_excerpt'] ) ? esc_attr( $instance['show_excerpt'] ) : '';
258
  $show_author = isset( $instance['show_author'] ) ? esc_attr( $instance['show_author'] ) : '';
259
  $show_date = isset( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
260
- $post_types = isset( $instance['post_types'] ) && ! empty( $instance['post_types'] ) ? $instance['post_types'] : $crp_settings['post_types'];
 
 
261
 
262
  $arguments = array(
263
  'is_widget' => 1,
@@ -270,11 +295,13 @@ class CRP_Widget extends WP_Widget {
270
  'post_thumb_op' => $post_thumb_op,
271
  'thumb_height' => $thumb_height,
272
  'thumb_width' => $thumb_width,
 
 
273
  'post_types' => $post_types,
274
  );
275
 
276
  /**
277
- * Filters arguments passed to crp_pop_posts for the widget.
278
  *
279
  * @since 2.0.0
280
  *
54
  $post_thumb_op = isset( $instance['post_thumb_op'] ) ? esc_attr( $instance['post_thumb_op'] ) : '';
55
  $thumb_height = isset( $instance['thumb_height'] ) ? esc_attr( $instance['thumb_height'] ) : '';
56
  $thumb_width = isset( $instance['thumb_width'] ) ? esc_attr( $instance['thumb_width'] ) : '';
57
+ $ordering = isset( $instance['ordering'] ) ? esc_attr( $instance['ordering'] ) : '';
58
+ $random_order = isset( $instance['random_order'] ) ? esc_attr( $instance['random_order'] ) : '';
59
 
60
  // Parse the Post types.
61
  $post_types = array();
74
  );
75
  $posts_types_inc = array_intersect( $wp_post_types, $post_types );
76
 
77
+ // Get the different ordering settings.
78
+ $orderings = crp_get_orderings();
79
+
80
  ?>
81
  <p>
82
  <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
127
  <?php esc_html_e( 'Thumbnail width', 'contextual-related-posts' ); ?>: <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'thumb_width' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_width' ) ); ?>" type="text" value="<?php echo esc_attr( $thumb_width ); ?>" />
128
  </label>
129
  </p>
130
+ <p><?php esc_html_e( 'Order posts', 'contextual-related-posts' ); ?>:<br />
131
+
132
+ <?php foreach ( $orderings as $order => $label ) { ?>
133
+
134
+ <label>
135
+ <input id="<?php echo esc_attr( $this->get_field_id( 'ordering' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'ordering' ) ); ?>" type="radio" value="<?php echo esc_attr( $order ); ?>" <?php checked( $order === $ordering ); ?> />
136
+ <?php echo esc_attr( $label ); ?>
137
+ </label>
138
+ <br />
139
 
140
+ <?php } ?>
141
+ </p>
142
+ <p>
143
+ <label for="<?php echo esc_attr( $this->get_field_id( 'random_order' ) ); ?>">
144
+ <input id="<?php echo esc_attr( $this->get_field_id( 'random_order' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'random_order' ) ); ?>" type="checkbox" <?php checked( true, $random_order, true ); ?> /> <?php esc_html_e( ' Randomize posts', 'contextual-related-posts' ); ?>
145
+ </label>
146
+ </p>
147
  <p><?php esc_html_e( 'Post types to include', 'contextual-related-posts' ); ?>:<br />
148
 
149
  <?php foreach ( $wp_post_types as $wp_post_type ) { ?>
193
  $instance['show_author'] = isset( $new_instance['show_author'] ) ? true : false;
194
  $instance['show_date'] = isset( $new_instance['show_date'] ) ? true : false;
195
  $instance['offset'] = ( ! empty( $new_instance['offset'] ) ) ? intval( $new_instance['offset'] ) : '';
196
+ $instance['ordering'] = isset( $new_instance['ordering'] ) ? $new_instance['ordering'] : '';
197
+ $instance['random_order'] = isset( $new_instance['random_order'] ) ? true : false;
198
 
199
  // Process post types to be selected.
200
  $wp_post_types = get_post_types(
229
  * @param array $instance Saved values from database.
230
  */
231
  public function widget( $args, $instance ) {
232
+ global $post;
233
 
234
  // Get the post meta.
235
  if ( isset( $post ) ) {
241
  }
242
 
243
  // If post_types is empty or contains a query string then use parse_str else consider it comma-separated.
244
+ if ( crp_get_option( 'exclude_on_post_types' ) && false === strpos( crp_get_option( 'exclude_on_post_types' ), '=' ) ) {
245
+ $exclude_on_post_types = explode( ',', crp_get_option( 'exclude_on_post_types' ) );
246
  } else {
247
+ parse_str( crp_get_option( 'exclude_on_post_types' ), $exclude_on_post_types ); // Save post types in $exclude_on_post_types variable.
248
  }
249
 
250
  if ( is_object( $post ) && ( in_array( $post->post_type, $exclude_on_post_types, true ) ) ) {
251
  return 0; // Exit without adding related posts.
252
  }
253
 
254
+ $exclude_on_post_ids = explode( ',', crp_get_option( 'exclude_on_post_ids' ) );
255
 
256
  if ( ( ( is_single() ) && ( ! is_single( $exclude_on_post_ids ) ) ) || ( ( is_page() ) && ( ! is_page( $exclude_on_post_ids ) ) ) ) {
257
 
258
+ $title = empty( $instance['title'] ) ? wp_strip_all_tags( str_replace( '%postname%', $post->post_title, crp_get_option( 'title' ) ) ) : $instance['title'];
259
 
260
  /**
261
  * Filters the widget title.
268
  */
269
  $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
270
 
271
+ $limit = isset( $instance['limit'] ) ? $instance['limit'] : crp_get_option( 'limit' );
272
  if ( empty( $limit ) ) {
273
+ $limit = crp_get_option( 'limit' );
274
  }
275
  $offset = isset( $instance['offset'] ) ? $instance['offset'] : 0;
276
 
277
  $post_thumb_op = isset( $instance['post_thumb_op'] ) ? esc_attr( $instance['post_thumb_op'] ) : 'text_only';
278
+ $thumb_height = isset( $instance['thumb_height'] ) && ! empty( $instance['thumb_height'] ) ? esc_attr( $instance['thumb_height'] ) : crp_get_option( 'thumb_height' );
279
+ $thumb_width = isset( $instance['thumb_width'] ) && ! empty( $instance['thumb_width'] ) ? esc_attr( $instance['thumb_width'] ) : crp_get_option( 'thumb_width' );
280
  $show_excerpt = isset( $instance['show_excerpt'] ) ? esc_attr( $instance['show_excerpt'] ) : '';
281
  $show_author = isset( $instance['show_author'] ) ? esc_attr( $instance['show_author'] ) : '';
282
  $show_date = isset( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
283
+ $ordering = isset( $instance['ordering'] ) ? esc_attr( $instance['ordering'] ) : '';
284
+ $random_order = isset( $instance['random_order'] ) ? esc_attr( $instance['random_order'] ) : '';
285
+ $post_types = isset( $instance['post_types'] ) && ! empty( $instance['post_types'] ) ? $instance['post_types'] : crp_get_option( 'post_types' );
286
 
287
  $arguments = array(
288
  'is_widget' => 1,
295
  'post_thumb_op' => $post_thumb_op,
296
  'thumb_height' => $thumb_height,
297
  'thumb_width' => $thumb_width,
298
+ 'ordering' => $ordering,
299
+ 'random_order' => $random_order,
300
  'post_types' => $post_types,
301
  );
302
 
303
  /**
304
+ * Filters arguments passed to get_crp for the widget.
305
  *
306
  * @since 2.0.0
307
  *
languages/contextual-related-posts-en_US.mo CHANGED
Binary file
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: 2019-06-16 13:27+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Ajay D'Souza\n"
8
  "Language-Team: WebberZone <plugins@webberzone.com>\n"
@@ -13,7 +13,7 @@ msgstr ""
13
  "X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_attr__;esc_html_e;"
14
  "esc_attr_e\n"
15
  "X-Poedit-Basepath: ..\n"
16
- "X-Generator: Poedit 2.2\n"
17
  "X-Poedit-SourceCharset: UTF-8\n"
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
  "X-Poedit-SearchPath-0: .\n"
@@ -46,6 +46,115 @@ msgid ""
46
  "\"%2$s\" target=\"_blank\">WordPress.org</a>"
47
  msgstr ""
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  #: includes/admin/default-settings.php:62
50
  msgid "Cache posts only"
51
  msgstr ""
@@ -235,7 +344,7 @@ msgid "No related posts found"
235
  msgstr ""
236
 
237
  #: includes/admin/default-settings.php:210
238
- #: includes/admin/default-settings.php:640
239
  msgid "Show post excerpt"
240
  msgstr ""
241
 
@@ -249,20 +358,12 @@ msgstr ""
249
  msgid "Length of excerpt (in words)"
250
  msgstr ""
251
 
252
- #: includes/admin/default-settings.php:226
253
- msgid "Show date"
254
- msgstr ""
255
-
256
  #: includes/admin/default-settings.php:227
257
  msgid ""
258
  "Displays the date of the post. Uses the same date format set in General "
259
  "Options."
260
  msgstr ""
261
 
262
- #: includes/admin/default-settings.php:233
263
- msgid "Show author"
264
- msgstr ""
265
-
266
  #: includes/admin/default-settings.php:240
267
  msgid "Limit post title length (in characters)"
268
  msgstr ""
@@ -324,7 +425,7 @@ msgid "After each list item"
324
  msgstr ""
325
 
326
  #: includes/admin/default-settings.php:339
327
- #: includes/admin/default-settings.php:631
328
  msgid "Number of posts to display"
329
  msgstr ""
330
 
@@ -346,26 +447,11 @@ msgid ""
346
  msgstr ""
347
 
348
  #: includes/admin/default-settings.php:356
 
349
  msgid "Order posts"
350
  msgstr ""
351
 
352
- #: includes/admin/default-settings.php:361
353
- msgid "By relevance"
354
- msgstr ""
355
-
356
- #: includes/admin/default-settings.php:362
357
- msgid "Randomly"
358
- msgstr ""
359
-
360
- #: includes/admin/default-settings.php:363
361
- msgid "By date"
362
- msgstr ""
363
-
364
- #: includes/admin/default-settings.php:368
365
- msgid "Randomize posts"
366
- msgstr ""
367
-
368
- #: includes/admin/default-settings.php:369
369
  msgid ""
370
  "This shuffles the selected related posts. If you select to order by date in "
371
  "the previous option, then the related posts will first be sorted by date and "
@@ -373,86 +459,86 @@ msgid ""
373
  "enabled."
374
  msgstr ""
375
 
376
- #: includes/admin/default-settings.php:375
377
  msgid "Related posts based on title and content"
378
  msgstr ""
379
 
380
- #: includes/admin/default-settings.php:376
381
  msgid ""
382
  "If unchecked, only posts titles are used. Enable the cache if enabling this "
383
  "option for better performance. Each site is different, so toggle this option "
384
  "to see which setting gives you better quality related posts."
385
  msgstr ""
386
 
387
- #: includes/admin/default-settings.php:382
388
  msgid "Limit content to be compared"
389
  msgstr ""
390
 
391
- #: includes/admin/default-settings.php:383
392
  msgid ""
393
  "This sets the maximum words of the content that will be matched. Set to 0 "
394
  "for no limit. Max value: 2,000. Only applies if you activate the above "
395
  "option."
396
  msgstr ""
397
 
398
- #: includes/admin/default-settings.php:391
399
- #: includes/modules/class-crp-widget.php:126
400
  msgid "Post types to include"
401
  msgstr ""
402
 
403
- #: includes/admin/default-settings.php:392
404
  msgid ""
405
  "At least one option should be selected above. Select which post types you "
406
  "want to include in the list of posts. This field can be overridden using a "
407
  "comma separated list of post types when using the manual display."
408
  msgstr ""
409
 
410
- #: includes/admin/default-settings.php:398
411
  msgid "Limit to same post type"
412
  msgstr ""
413
 
414
- #: includes/admin/default-settings.php:399
415
  msgid ""
416
  "If checked, the related posts will only be selected from the same post type "
417
  "of the current post."
418
  msgstr ""
419
 
420
- #: includes/admin/default-settings.php:405
421
  msgid "Limit to same author"
422
  msgstr ""
423
 
424
- #: includes/admin/default-settings.php:406
425
  msgid ""
426
  "If checked, the related posts will only be selected from the same author of "
427
  "the current post."
428
  msgstr ""
429
 
430
- #: includes/admin/default-settings.php:412
431
  msgid "Post/page IDs to exclude"
432
  msgstr ""
433
 
434
- #: includes/admin/default-settings.php:413
435
  msgid ""
436
  "Comma-separated list of post or page IDs to exclude from the list. e.g. "
437
  "188,320,500"
438
  msgstr ""
439
 
440
- #: includes/admin/default-settings.php:419
441
  msgid "Exclude Categories"
442
  msgstr ""
443
 
444
- #: includes/admin/default-settings.php:420
445
  msgid ""
446
  "Comma separated list of category slugs. The field above has an autocomplete "
447
  "so simply start typing in the starting letters and it will prompt you with "
448
  "options. Does not support custom taxonomies."
449
  msgstr ""
450
 
451
- #: includes/admin/default-settings.php:431
452
  msgid "Exclude category IDs"
453
  msgstr ""
454
 
455
- #: includes/admin/default-settings.php:432
456
  msgid ""
457
  "This is a readonly field that is automatically populated based on the above "
458
  "input when the settings are saved. These might differ from the IDs visible "
@@ -460,36 +546,36 @@ msgid ""
460
  "the term_taxonomy_id which is unique to this taxonomy."
461
  msgstr ""
462
 
463
- #: includes/admin/default-settings.php:462
464
- #: includes/admin/default-settings.php:647
465
  msgid "Location of the post thumbnail"
466
  msgstr ""
467
 
468
- #: includes/admin/default-settings.php:467
469
- #: includes/admin/default-settings.php:652
470
  msgid "Display thumbnails inline with posts, before title"
471
  msgstr ""
472
 
473
- #: includes/admin/default-settings.php:468
474
- #: includes/admin/default-settings.php:653
475
  msgid "Display thumbnails inline with posts, after title"
476
  msgstr ""
477
 
478
- #: includes/admin/default-settings.php:469
479
- #: includes/admin/default-settings.php:654
480
  msgid "Display only thumbnails, no text"
481
  msgstr ""
482
 
483
- #: includes/admin/default-settings.php:470
484
- #: includes/admin/default-settings.php:655
485
  msgid "Do not display thumbnails, only text"
486
  msgstr ""
487
 
488
- #: includes/admin/default-settings.php:475
489
  msgid "Thumbnail size"
490
  msgstr ""
491
 
492
- #: includes/admin/default-settings.php:476
493
  msgid ""
494
  "You can choose from existing image sizes above or create a custom size. If "
495
  "you have chosen Custom size above, then enter the width, height and crop "
@@ -497,125 +583,125 @@ msgid ""
497
  "width and/or height below, existing images will not be automatically resized."
498
  msgstr ""
499
 
500
- #: includes/admin/default-settings.php:478
501
  #, php-format
502
  msgid "I recommend using %1$s or %2$s to regenerate all image sizes."
503
  msgstr ""
504
 
505
- #: includes/admin/default-settings.php:488
506
- #: includes/admin/default-settings.php:660
507
- #: includes/modules/class-crp-widget.php:122
508
  msgid "Thumbnail width"
509
  msgstr ""
510
 
511
- #: includes/admin/default-settings.php:497
512
- #: includes/admin/default-settings.php:669
513
- #: includes/modules/class-crp-widget.php:117
514
  msgid "Thumbnail height"
515
  msgstr ""
516
 
517
- #: includes/admin/default-settings.php:506
518
  msgid "Hard crop thumbnails"
519
  msgstr ""
520
 
521
- #: includes/admin/default-settings.php:507
522
  msgid ""
523
  "Check this box to hard crop the thumbnails. i.e. force the width and height "
524
  "above vs. maintaining proportions."
525
  msgstr ""
526
 
527
- #: includes/admin/default-settings.php:513
528
  msgid "Generate thumbnail sizes"
529
  msgstr ""
530
 
531
- #: includes/admin/default-settings.php:514
532
  msgid ""
533
  "If you select this option and Custom size is selected above, the plugin will "
534
  "register the image size with WordPress to create new thumbnails. Does not "
535
  "update old images as explained above."
536
  msgstr ""
537
 
538
- #: includes/admin/default-settings.php:520
539
  msgid "Thumbnail size attributes"
540
  msgstr ""
541
 
542
- #: includes/admin/default-settings.php:526
543
  #, php-format
544
  msgid "Use CSS to set the width and height: e.g. %s"
545
  msgstr ""
546
 
547
- #: includes/admin/default-settings.php:528
548
  #, php-format
549
  msgid "Use HTML attributes to set the width and height: e.g. %s"
550
  msgstr ""
551
 
552
- #: includes/admin/default-settings.php:529
553
  msgid ""
554
  "No width or height set. You will need to use external styles to force any "
555
  "width or height of your choice."
556
  msgstr ""
557
 
558
- #: includes/admin/default-settings.php:534
559
  msgid "Thumbnail meta field name"
560
  msgstr ""
561
 
562
- #: includes/admin/default-settings.php:535
563
  msgid ""
564
  "The value of this field should contain the URL of the image and can be set "
565
  "in the metabox in the Edit Post screen"
566
  msgstr ""
567
 
568
- #: includes/admin/default-settings.php:541
569
  msgid "Get first image"
570
  msgstr ""
571
 
572
- #: includes/admin/default-settings.php:542
573
  msgid ""
574
  "The plugin will fetch the first image in the post content if this is "
575
  "enabled. This can slow down the loading of your page if the first image in "
576
  "the followed posts is large in file-size."
577
  msgstr ""
578
 
579
- #: includes/admin/default-settings.php:548
580
  msgid "Use default thumbnail?"
581
  msgstr ""
582
 
583
- #: includes/admin/default-settings.php:549
584
  msgid ""
585
  "If checked, when no thumbnail is found, show a default one from the URL "
586
  "below. If not checked and no thumbnail is found, no image will be shown."
587
  msgstr ""
588
 
589
- #: includes/admin/default-settings.php:555 includes/admin/settings-page.php:746
590
  msgid "Default thumbnail"
591
  msgstr ""
592
 
593
- #: includes/admin/default-settings.php:556
594
  msgid ""
595
  "Enter the full URL of the image that you wish to display if no thumbnail is "
596
  "found. This image will be displayed below."
597
  msgstr ""
598
 
599
- #: includes/admin/default-settings.php:586
600
  msgid "Related Posts style"
601
  msgstr ""
602
 
603
- #: includes/admin/default-settings.php:594
604
  msgid "Custom CSS"
605
  msgstr ""
606
 
607
- #: includes/admin/default-settings.php:596
608
  #, php-format
609
  msgid ""
610
  "Do not include %3$sstyle%4$s tags. Check out the %1$sFAQ%2$s for available "
611
  "CSS classes to style."
612
  msgstr ""
613
 
614
- #: includes/admin/default-settings.php:625
615
  msgid "About this tab"
616
  msgstr ""
617
 
618
- #: includes/admin/default-settings.php:626
619
  msgid ""
620
  "Below options override the related posts settings for your blog feed. These "
621
  "only apply if you have selected to add related posts to Feeds in the General "
@@ -623,33 +709,45 @@ msgid ""
623
  "way to style the related posts in the feed."
624
  msgstr ""
625
 
626
- #: includes/admin/default-settings.php:746
627
  msgid "No styles"
628
  msgstr ""
629
 
630
- #: includes/admin/default-settings.php:747
631
  msgid "Select this option if you plan to add your own styles"
632
  msgstr ""
633
 
634
- #: includes/admin/default-settings.php:751
635
  msgid "Text only"
636
  msgstr ""
637
 
638
- #: includes/admin/default-settings.php:752
639
  msgid "Disable thumbnails and no longer include the default style sheet"
640
  msgstr ""
641
 
642
- #: includes/admin/default-settings.php:756
643
  msgid "Rounded thumbnails"
644
  msgstr ""
645
 
646
- #: includes/admin/default-settings.php:757
647
  msgid ""
648
  "Enabling this option will turn on the thumbnails and force their width and "
649
  "height. It will also turn off the display of the author, excerpt and date if "
650
  "already enabled. Disabling this option will not revert any settings."
651
  msgstr ""
652
 
 
 
 
 
 
 
 
 
 
 
 
 
653
  #: includes/admin/help-tab.php:35 includes/admin/help-tab.php:126
654
  #, php-format
655
  msgid ""
@@ -802,66 +900,78 @@ msgstr ""
802
  msgid "Contribute"
803
  msgstr ""
804
 
805
- #: includes/admin/modules/metabox.php:108
806
  msgid "Disable Related Posts display:"
807
  msgstr ""
808
 
809
- #: includes/admin/modules/metabox.php:111
810
  msgid ""
811
  "If this is checked, then Contextual Related Posts will not automatically "
812
  "insert the related posts at the end of post content."
813
  msgstr ""
814
 
815
- #: includes/admin/modules/metabox.php:115
816
  msgid "Exclude this post from the related posts list:"
817
  msgstr ""
818
 
819
- #: includes/admin/modules/metabox.php:118
820
  msgid ""
821
  "If this is checked, then this post will be excluded from the popular posts "
822
  "list."
823
  msgstr ""
824
 
825
- #: includes/admin/modules/metabox.php:122
826
- #: includes/admin/modules/metabox.php:130
 
 
 
 
 
 
 
 
 
 
 
 
827
  msgid "Manual related posts:"
828
  msgstr ""
829
 
830
- #: includes/admin/modules/metabox.php:124
831
  msgid ""
832
  "Comma separated list of post, page or custom post type IDs. e.g. "
833
  "188,320,500. These will be given preference over the related posts generated "
834
  "by the plugin."
835
  msgstr ""
836
 
837
- #: includes/admin/modules/metabox.php:125
838
  msgid ""
839
  "Once you enter the list above and save this page, the plugin will display "
840
  "the titles of the posts below for your reference. Only IDs corresponding to "
841
  "published posts or custom post types will be retained."
842
  msgstr ""
843
 
844
- #: includes/admin/modules/metabox.php:141
845
  #, php-format
846
  msgid "This post type is: %s"
847
  msgstr ""
848
 
849
- #: includes/admin/modules/metabox.php:152
850
  msgid "Location of thumbnail"
851
  msgstr ""
852
 
853
- #: includes/admin/modules/metabox.php:154
854
  msgid ""
855
  "Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
856
  "image will be used for the post. It will be resized to the thumbnail size "
857
  "set under Settings &raquo; Related Posts &raquo; Output Options"
858
  msgstr ""
859
 
860
- #: includes/admin/modules/metabox.php:155
861
  msgid "The URL above is saved in the meta field:"
862
  msgstr ""
863
 
864
- #: includes/admin/modules/metabox.php:160
865
  msgid ""
866
  "You have Top 10 WordPress Plugin installed. If you are trying to modify the "
867
  "thumbnail, then you'll need to make the same change in the Top 10 meta box "
@@ -989,6 +1099,19 @@ msgstr ""
989
  msgid "Modified from default setting"
990
  msgstr ""
991
 
 
 
 
 
 
 
 
 
 
 
 
 
 
992
  #: includes/admin/sidebar.php:20
993
  msgid "Support the development"
994
  msgstr ""
@@ -1041,7 +1164,7 @@ msgstr ""
1041
  msgid "<h3>Related Posts:</h3>"
1042
  msgstr ""
1043
 
1044
- #: includes/main-query.php:195
1045
  #, php-format
1046
  msgid "Powered by <a href=\"%s\" rel=\"nofollow\">Contextual Related Posts</a>"
1047
  msgstr ""
@@ -1058,58 +1181,46 @@ msgstr ""
1058
  msgid "filter argument has been deprecated"
1059
  msgstr ""
1060
 
1061
- #: includes/modules/class-crp-widget.php:32
1062
- msgid "Related Posts [CRP]"
1063
- msgstr ""
1064
-
1065
  #: includes/modules/class-crp-widget.php:34
1066
  msgid "Display Related Posts"
1067
  msgstr ""
1068
 
1069
- #: includes/modules/class-crp-widget.php:78
1070
- msgid "Title"
1071
- msgstr ""
1072
-
1073
  #: includes/modules/class-crp-widget.php:83
1074
- msgid "No. of posts"
1075
- msgstr ""
1076
-
1077
- #: includes/modules/class-crp-widget.php:88
1078
- msgid "Offset"
1079
  msgstr ""
1080
 
1081
- #: includes/modules/class-crp-widget.php:93
1082
  msgid " Show excerpt?"
1083
  msgstr ""
1084
 
1085
- #: includes/modules/class-crp-widget.php:98
1086
  msgid " Show author?"
1087
  msgstr ""
1088
 
1089
- #: includes/modules/class-crp-widget.php:103
1090
  msgid " Show date?"
1091
  msgstr ""
1092
 
1093
- #: includes/modules/class-crp-widget.php:107
1094
- msgid "Thumbnail options"
1095
- msgstr ""
1096
-
1097
- #: includes/modules/class-crp-widget.php:109
1098
  msgid "Thumbnails inline, before title"
1099
  msgstr ""
1100
 
1101
- #: includes/modules/class-crp-widget.php:110
1102
  msgid "Thumbnails inline, after title"
1103
  msgstr ""
1104
 
1105
- #: includes/modules/class-crp-widget.php:111
1106
  msgid "Only thumbnails, no text"
1107
  msgstr ""
1108
 
1109
- #: includes/modules/class-crp-widget.php:112
1110
  msgid "No thumbnails, only text."
1111
  msgstr ""
1112
 
 
 
 
 
1113
  #: includes/output-generator.php:239
1114
  msgid " by "
1115
  msgstr ""
2
  msgstr ""
3
  "Project-Id-Version: Contextual Related Posts\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2019-12-30 14:25+0530\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Ajay D'Souza\n"
8
  "Language-Team: WebberZone <plugins@webberzone.com>\n"
13
  "X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_attr__;esc_html_e;"
14
  "esc_attr_e\n"
15
  "X-Poedit-Basepath: ..\n"
16
+ "X-Generator: Poedit 2.2.4\n"
17
  "X-Poedit-SourceCharset: UTF-8\n"
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
  "X-Poedit-SearchPath-0: .\n"
46
  "\"%2$s\" target=\"_blank\">WordPress.org</a>"
47
  msgstr ""
48
 
49
+ #: includes/admin/blocks/related-posts/index.js:22
50
+ #: includes/admin/blocks/related-posts/index.min.js:1
51
+ #: includes/modules/class-crp-widget.php:32
52
+ msgid "Related Posts [CRP]"
53
+ msgstr ""
54
+
55
+ #: includes/admin/blocks/related-posts/index.js:23
56
+ #: includes/admin/blocks/related-posts/index.min.js:1
57
+ msgid "Display related posts by Contextual Related Posts"
58
+ msgstr ""
59
+
60
+ #: includes/admin/blocks/related-posts/index.js:26
61
+ #: includes/admin/blocks/related-posts/index.min.js:1
62
+ msgid "related posts"
63
+ msgstr ""
64
+
65
+ #: includes/admin/blocks/related-posts/index.js:26
66
+ #: includes/admin/blocks/related-posts/index.min.js:1
67
+ msgid "contextual"
68
+ msgstr ""
69
+
70
+ #: includes/admin/blocks/related-posts/index.js:26
71
+ #: includes/admin/blocks/related-posts/index.min.js:1
72
+ msgid "posts"
73
+ msgstr ""
74
+
75
+ #: includes/admin/blocks/related-posts/index.js:141
76
+ #: includes/admin/blocks/related-posts/index.min.js:1
77
+ msgid "Show heading"
78
+ msgstr ""
79
+
80
+ #: includes/admin/blocks/related-posts/index.js:146
81
+ #: includes/admin/blocks/related-posts/index.min.js:1
82
+ #: includes/modules/class-crp-widget.php:88
83
+ msgid "No. of posts"
84
+ msgstr ""
85
+
86
+ #: includes/admin/blocks/related-posts/index.js:157
87
+ #: includes/admin/blocks/related-posts/index.min.js:1
88
+ #: includes/modules/class-crp-widget.php:93
89
+ msgid "Offset"
90
+ msgstr ""
91
+
92
+ #: includes/admin/blocks/related-posts/index.js:168
93
+ #: includes/admin/blocks/related-posts/index.min.js:1
94
+ msgid "Show excerpt"
95
+ msgstr ""
96
+
97
+ #: includes/admin/blocks/related-posts/index.js:173
98
+ #: includes/admin/blocks/related-posts/index.min.js:1
99
+ #: includes/admin/default-settings.php:233
100
+ msgid "Show author"
101
+ msgstr ""
102
+
103
+ #: includes/admin/blocks/related-posts/index.js:178
104
+ #: includes/admin/blocks/related-posts/index.min.js:1
105
+ #: includes/admin/default-settings.php:226
106
+ msgid "Show date"
107
+ msgstr ""
108
+
109
+ #: includes/admin/blocks/related-posts/index.js:184
110
+ #: includes/admin/blocks/related-posts/index.min.js:1
111
+ #: includes/modules/class-crp-widget.php:112
112
+ msgid "Thumbnail options"
113
+ msgstr ""
114
+
115
+ #: includes/admin/blocks/related-posts/index.js:187
116
+ #: includes/admin/blocks/related-posts/index.min.js:1
117
+ msgid "Before title"
118
+ msgstr ""
119
+
120
+ #: includes/admin/blocks/related-posts/index.js:188
121
+ #: includes/admin/blocks/related-posts/index.min.js:1
122
+ msgid "After title"
123
+ msgstr ""
124
+
125
+ #: includes/admin/blocks/related-posts/index.js:189
126
+ #: includes/admin/blocks/related-posts/index.min.js:1
127
+ msgid "Only thumbnail"
128
+ msgstr ""
129
+
130
+ #: includes/admin/blocks/related-posts/index.js:190
131
+ #: includes/admin/blocks/related-posts/index.min.js:1
132
+ msgid "Only text"
133
+ msgstr ""
134
+
135
+ #: includes/admin/blocks/related-posts/index.js:195
136
+ #: includes/admin/blocks/related-posts/index.min.js:1
137
+ msgid "Ordering"
138
+ msgstr ""
139
+
140
+ #: includes/admin/blocks/related-posts/index.js:200
141
+ #: includes/admin/blocks/related-posts/index.min.js:1
142
+ #: includes/admin/default-settings.php:364
143
+ msgid "Randomize posts"
144
+ msgstr ""
145
+
146
+ #: includes/admin/blocks/related-posts/index.js:205
147
+ #: includes/admin/blocks/related-posts/index.min.js:1
148
+ msgid "Other attributes"
149
+ msgstr ""
150
+
151
+ #: includes/admin/blocks/related-posts/index.js:206
152
+ #: includes/admin/blocks/related-posts/index.min.js:1
153
+ msgid ""
154
+ "Enter other attributes in a URL-style string-query. e.g. post_types=post,"
155
+ "page&link_nofollow=1&exclude_post_ids=5,6"
156
+ msgstr ""
157
+
158
  #: includes/admin/default-settings.php:62
159
  msgid "Cache posts only"
160
  msgstr ""
344
  msgstr ""
345
 
346
  #: includes/admin/default-settings.php:210
347
+ #: includes/admin/default-settings.php:636
348
  msgid "Show post excerpt"
349
  msgstr ""
350
 
358
  msgid "Length of excerpt (in words)"
359
  msgstr ""
360
 
 
 
 
 
361
  #: includes/admin/default-settings.php:227
362
  msgid ""
363
  "Displays the date of the post. Uses the same date format set in General "
364
  "Options."
365
  msgstr ""
366
 
 
 
 
 
367
  #: includes/admin/default-settings.php:240
368
  msgid "Limit post title length (in characters)"
369
  msgstr ""
425
  msgstr ""
426
 
427
  #: includes/admin/default-settings.php:339
428
+ #: includes/admin/default-settings.php:627
429
  msgid "Number of posts to display"
430
  msgstr ""
431
 
447
  msgstr ""
448
 
449
  #: includes/admin/default-settings.php:356
450
+ #: includes/modules/class-crp-widget.php:130
451
  msgid "Order posts"
452
  msgstr ""
453
 
454
+ #: includes/admin/default-settings.php:365
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
455
  msgid ""
456
  "This shuffles the selected related posts. If you select to order by date in "
457
  "the previous option, then the related posts will first be sorted by date and "
459
  "enabled."
460
  msgstr ""
461
 
462
+ #: includes/admin/default-settings.php:371
463
  msgid "Related posts based on title and content"
464
  msgstr ""
465
 
466
+ #: includes/admin/default-settings.php:372
467
  msgid ""
468
  "If unchecked, only posts titles are used. Enable the cache if enabling this "
469
  "option for better performance. Each site is different, so toggle this option "
470
  "to see which setting gives you better quality related posts."
471
  msgstr ""
472
 
473
+ #: includes/admin/default-settings.php:378
474
  msgid "Limit content to be compared"
475
  msgstr ""
476
 
477
+ #: includes/admin/default-settings.php:379
478
  msgid ""
479
  "This sets the maximum words of the content that will be matched. Set to 0 "
480
  "for no limit. Max value: 2,000. Only applies if you activate the above "
481
  "option."
482
  msgstr ""
483
 
484
+ #: includes/admin/default-settings.php:387
485
+ #: includes/modules/class-crp-widget.php:147
486
  msgid "Post types to include"
487
  msgstr ""
488
 
489
+ #: includes/admin/default-settings.php:388
490
  msgid ""
491
  "At least one option should be selected above. Select which post types you "
492
  "want to include in the list of posts. This field can be overridden using a "
493
  "comma separated list of post types when using the manual display."
494
  msgstr ""
495
 
496
+ #: includes/admin/default-settings.php:394
497
  msgid "Limit to same post type"
498
  msgstr ""
499
 
500
+ #: includes/admin/default-settings.php:395
501
  msgid ""
502
  "If checked, the related posts will only be selected from the same post type "
503
  "of the current post."
504
  msgstr ""
505
 
506
+ #: includes/admin/default-settings.php:401
507
  msgid "Limit to same author"
508
  msgstr ""
509
 
510
+ #: includes/admin/default-settings.php:402
511
  msgid ""
512
  "If checked, the related posts will only be selected from the same author of "
513
  "the current post."
514
  msgstr ""
515
 
516
+ #: includes/admin/default-settings.php:408
517
  msgid "Post/page IDs to exclude"
518
  msgstr ""
519
 
520
+ #: includes/admin/default-settings.php:409
521
  msgid ""
522
  "Comma-separated list of post or page IDs to exclude from the list. e.g. "
523
  "188,320,500"
524
  msgstr ""
525
 
526
+ #: includes/admin/default-settings.php:415
527
  msgid "Exclude Categories"
528
  msgstr ""
529
 
530
+ #: includes/admin/default-settings.php:416
531
  msgid ""
532
  "Comma separated list of category slugs. The field above has an autocomplete "
533
  "so simply start typing in the starting letters and it will prompt you with "
534
  "options. Does not support custom taxonomies."
535
  msgstr ""
536
 
537
+ #: includes/admin/default-settings.php:427
538
  msgid "Exclude category IDs"
539
  msgstr ""
540
 
541
+ #: includes/admin/default-settings.php:428
542
  msgid ""
543
  "This is a readonly field that is automatically populated based on the above "
544
  "input when the settings are saved. These might differ from the IDs visible "
546
  "the term_taxonomy_id which is unique to this taxonomy."
547
  msgstr ""
548
 
549
+ #: includes/admin/default-settings.php:458
550
+ #: includes/admin/default-settings.php:643
551
  msgid "Location of the post thumbnail"
552
  msgstr ""
553
 
554
+ #: includes/admin/default-settings.php:463
555
+ #: includes/admin/default-settings.php:648
556
  msgid "Display thumbnails inline with posts, before title"
557
  msgstr ""
558
 
559
+ #: includes/admin/default-settings.php:464
560
+ #: includes/admin/default-settings.php:649
561
  msgid "Display thumbnails inline with posts, after title"
562
  msgstr ""
563
 
564
+ #: includes/admin/default-settings.php:465
565
+ #: includes/admin/default-settings.php:650
566
  msgid "Display only thumbnails, no text"
567
  msgstr ""
568
 
569
+ #: includes/admin/default-settings.php:466
570
+ #: includes/admin/default-settings.php:651
571
  msgid "Do not display thumbnails, only text"
572
  msgstr ""
573
 
574
+ #: includes/admin/default-settings.php:471
575
  msgid "Thumbnail size"
576
  msgstr ""
577
 
578
+ #: includes/admin/default-settings.php:472
579
  msgid ""
580
  "You can choose from existing image sizes above or create a custom size. If "
581
  "you have chosen Custom size above, then enter the width, height and crop "
583
  "width and/or height below, existing images will not be automatically resized."
584
  msgstr ""
585
 
586
+ #: includes/admin/default-settings.php:474
587
  #, php-format
588
  msgid "I recommend using %1$s or %2$s to regenerate all image sizes."
589
  msgstr ""
590
 
591
+ #: includes/admin/default-settings.php:484
592
+ #: includes/admin/default-settings.php:656
593
+ #: includes/modules/class-crp-widget.php:127
594
  msgid "Thumbnail width"
595
  msgstr ""
596
 
597
+ #: includes/admin/default-settings.php:493
598
+ #: includes/admin/default-settings.php:665
599
+ #: includes/modules/class-crp-widget.php:122
600
  msgid "Thumbnail height"
601
  msgstr ""
602
 
603
+ #: includes/admin/default-settings.php:502
604
  msgid "Hard crop thumbnails"
605
  msgstr ""
606
 
607
+ #: includes/admin/default-settings.php:503
608
  msgid ""
609
  "Check this box to hard crop the thumbnails. i.e. force the width and height "
610
  "above vs. maintaining proportions."
611
  msgstr ""
612
 
613
+ #: includes/admin/default-settings.php:509
614
  msgid "Generate thumbnail sizes"
615
  msgstr ""
616
 
617
+ #: includes/admin/default-settings.php:510
618
  msgid ""
619
  "If you select this option and Custom size is selected above, the plugin will "
620
  "register the image size with WordPress to create new thumbnails. Does not "
621
  "update old images as explained above."
622
  msgstr ""
623
 
624
+ #: includes/admin/default-settings.php:516
625
  msgid "Thumbnail size attributes"
626
  msgstr ""
627
 
628
+ #: includes/admin/default-settings.php:522
629
  #, php-format
630
  msgid "Use CSS to set the width and height: e.g. %s"
631
  msgstr ""
632
 
633
+ #: includes/admin/default-settings.php:524
634
  #, php-format
635
  msgid "Use HTML attributes to set the width and height: e.g. %s"
636
  msgstr ""
637
 
638
+ #: includes/admin/default-settings.php:525
639
  msgid ""
640
  "No width or height set. You will need to use external styles to force any "
641
  "width or height of your choice."
642
  msgstr ""
643
 
644
+ #: includes/admin/default-settings.php:530
645
  msgid "Thumbnail meta field name"
646
  msgstr ""
647
 
648
+ #: includes/admin/default-settings.php:531
649
  msgid ""
650
  "The value of this field should contain the URL of the image and can be set "
651
  "in the metabox in the Edit Post screen"
652
  msgstr ""
653
 
654
+ #: includes/admin/default-settings.php:537
655
  msgid "Get first image"
656
  msgstr ""
657
 
658
+ #: includes/admin/default-settings.php:538
659
  msgid ""
660
  "The plugin will fetch the first image in the post content if this is "
661
  "enabled. This can slow down the loading of your page if the first image in "
662
  "the followed posts is large in file-size."
663
  msgstr ""
664
 
665
+ #: includes/admin/default-settings.php:544
666
  msgid "Use default thumbnail?"
667
  msgstr ""
668
 
669
+ #: includes/admin/default-settings.php:545
670
  msgid ""
671
  "If checked, when no thumbnail is found, show a default one from the URL "
672
  "below. If not checked and no thumbnail is found, no image will be shown."
673
  msgstr ""
674
 
675
+ #: includes/admin/default-settings.php:551 includes/admin/settings-page.php:746
676
  msgid "Default thumbnail"
677
  msgstr ""
678
 
679
+ #: includes/admin/default-settings.php:552
680
  msgid ""
681
  "Enter the full URL of the image that you wish to display if no thumbnail is "
682
  "found. This image will be displayed below."
683
  msgstr ""
684
 
685
+ #: includes/admin/default-settings.php:582
686
  msgid "Related Posts style"
687
  msgstr ""
688
 
689
+ #: includes/admin/default-settings.php:590
690
  msgid "Custom CSS"
691
  msgstr ""
692
 
693
+ #: includes/admin/default-settings.php:592
694
  #, php-format
695
  msgid ""
696
  "Do not include %3$sstyle%4$s tags. Check out the %1$sFAQ%2$s for available "
697
  "CSS classes to style."
698
  msgstr ""
699
 
700
+ #: includes/admin/default-settings.php:621
701
  msgid "About this tab"
702
  msgstr ""
703
 
704
+ #: includes/admin/default-settings.php:622
705
  msgid ""
706
  "Below options override the related posts settings for your blog feed. These "
707
  "only apply if you have selected to add related posts to Feeds in the General "
709
  "way to style the related posts in the feed."
710
  msgstr ""
711
 
712
+ #: includes/admin/default-settings.php:742
713
  msgid "No styles"
714
  msgstr ""
715
 
716
+ #: includes/admin/default-settings.php:743
717
  msgid "Select this option if you plan to add your own styles"
718
  msgstr ""
719
 
720
+ #: includes/admin/default-settings.php:747
721
  msgid "Text only"
722
  msgstr ""
723
 
724
+ #: includes/admin/default-settings.php:748
725
  msgid "Disable thumbnails and no longer include the default style sheet"
726
  msgstr ""
727
 
728
+ #: includes/admin/default-settings.php:752
729
  msgid "Rounded thumbnails"
730
  msgstr ""
731
 
732
+ #: includes/admin/default-settings.php:753
733
  msgid ""
734
  "Enabling this option will turn on the thumbnails and force their width and "
735
  "height. It will also turn off the display of the author, excerpt and date if "
736
  "already enabled. Disabling this option will not revert any settings."
737
  msgstr ""
738
 
739
+ #: includes/admin/default-settings.php:776
740
+ msgid "By relevance"
741
+ msgstr ""
742
+
743
+ #: includes/admin/default-settings.php:777
744
+ msgid "Randomly"
745
+ msgstr ""
746
+
747
+ #: includes/admin/default-settings.php:778
748
+ msgid "By date"
749
+ msgstr ""
750
+
751
  #: includes/admin/help-tab.php:35 includes/admin/help-tab.php:126
752
  #, php-format
753
  msgid ""
900
  msgid "Contribute"
901
  msgstr ""
902
 
903
+ #: includes/admin/modules/metabox.php:115
904
  msgid "Disable Related Posts display:"
905
  msgstr ""
906
 
907
+ #: includes/admin/modules/metabox.php:118
908
  msgid ""
909
  "If this is checked, then Contextual Related Posts will not automatically "
910
  "insert the related posts at the end of post content."
911
  msgstr ""
912
 
913
+ #: includes/admin/modules/metabox.php:122
914
  msgid "Exclude this post from the related posts list:"
915
  msgstr ""
916
 
917
+ #: includes/admin/modules/metabox.php:125
918
  msgid ""
919
  "If this is checked, then this post will be excluded from the popular posts "
920
  "list."
921
  msgstr ""
922
 
923
+ #: includes/admin/modules/metabox.php:129
924
+ msgid "Keyword:"
925
+ msgstr ""
926
+
927
+ #: includes/admin/modules/metabox.php:131
928
+ msgid ""
929
+ "Enter either a word or a phrase that will be used to find related posts. If "
930
+ "entered, the plugin will continue to search the `post_title` and "
931
+ "`post_content` fields but will use this keyword instead of the values of the "
932
+ "title and content of this post."
933
+ msgstr ""
934
+
935
+ #: includes/admin/modules/metabox.php:135
936
+ #: includes/admin/modules/metabox.php:143
937
  msgid "Manual related posts:"
938
  msgstr ""
939
 
940
+ #: includes/admin/modules/metabox.php:137
941
  msgid ""
942
  "Comma separated list of post, page or custom post type IDs. e.g. "
943
  "188,320,500. These will be given preference over the related posts generated "
944
  "by the plugin."
945
  msgstr ""
946
 
947
+ #: includes/admin/modules/metabox.php:138
948
  msgid ""
949
  "Once you enter the list above and save this page, the plugin will display "
950
  "the titles of the posts below for your reference. Only IDs corresponding to "
951
  "published posts or custom post types will be retained."
952
  msgstr ""
953
 
954
+ #: includes/admin/modules/metabox.php:154
955
  #, php-format
956
  msgid "This post type is: %s"
957
  msgstr ""
958
 
959
+ #: includes/admin/modules/metabox.php:165
960
  msgid "Location of thumbnail"
961
  msgstr ""
962
 
963
+ #: includes/admin/modules/metabox.php:167
964
  msgid ""
965
  "Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
966
  "image will be used for the post. It will be resized to the thumbnail size "
967
  "set under Settings &raquo; Related Posts &raquo; Output Options"
968
  msgstr ""
969
 
970
+ #: includes/admin/modules/metabox.php:168
971
  msgid "The URL above is saved in the meta field:"
972
  msgstr ""
973
 
974
+ #: includes/admin/modules/metabox.php:173
975
  msgid ""
976
  "You have Top 10 WordPress Plugin installed. If you are trying to modify the "
977
  "thumbnail, then you'll need to make the same change in the Top 10 meta box "
1099
  msgid "Modified from default setting"
1100
  msgstr ""
1101
 
1102
+ #: includes/admin/settings-page.php:768
1103
+ msgid ""
1104
+ "This option cannot be changed because of the selected related posts style. "
1105
+ "To modify this option, you will need to select No styles or Text only in the "
1106
+ "Styles tab"
1107
+ msgstr ""
1108
+
1109
+ #: includes/admin/settings-page.php:772
1110
+ msgid ""
1111
+ "This option cannot be changed because of the selected related posts style. "
1112
+ "To modify this option, you will need to select No styles in the Styles tab"
1113
+ msgstr ""
1114
+
1115
  #: includes/admin/sidebar.php:20
1116
  msgid "Support the development"
1117
  msgstr ""
1164
  msgid "<h3>Related Posts:</h3>"
1165
  msgstr ""
1166
 
1167
+ #: includes/main-query.php:201
1168
  #, php-format
1169
  msgid "Powered by <a href=\"%s\" rel=\"nofollow\">Contextual Related Posts</a>"
1170
  msgstr ""
1181
  msgid "filter argument has been deprecated"
1182
  msgstr ""
1183
 
 
 
 
 
1184
  #: includes/modules/class-crp-widget.php:34
1185
  msgid "Display Related Posts"
1186
  msgstr ""
1187
 
 
 
 
 
1188
  #: includes/modules/class-crp-widget.php:83
1189
+ msgid "Title"
 
 
 
 
1190
  msgstr ""
1191
 
1192
+ #: includes/modules/class-crp-widget.php:98
1193
  msgid " Show excerpt?"
1194
  msgstr ""
1195
 
1196
+ #: includes/modules/class-crp-widget.php:103
1197
  msgid " Show author?"
1198
  msgstr ""
1199
 
1200
+ #: includes/modules/class-crp-widget.php:108
1201
  msgid " Show date?"
1202
  msgstr ""
1203
 
1204
+ #: includes/modules/class-crp-widget.php:114
 
 
 
 
1205
  msgid "Thumbnails inline, before title"
1206
  msgstr ""
1207
 
1208
+ #: includes/modules/class-crp-widget.php:115
1209
  msgid "Thumbnails inline, after title"
1210
  msgstr ""
1211
 
1212
+ #: includes/modules/class-crp-widget.php:116
1213
  msgid "Only thumbnails, no text"
1214
  msgstr ""
1215
 
1216
+ #: includes/modules/class-crp-widget.php:117
1217
  msgid "No thumbnails, only text."
1218
  msgstr ""
1219
 
1220
+ #: includes/modules/class-crp-widget.php:144
1221
+ msgid " Randomize posts"
1222
+ msgstr ""
1223
+
1224
  #: includes/output-generator.php:239
1225
  msgid " by "
1226
  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: 2019-06-16 13:27+0100\n"
7
  "PO-Revision-Date: \n"
8
  "Last-Translator: Ajay D'Souza\n"
9
  "Language-Team: plugins@webberzone.com\n"
@@ -14,7 +14,7 @@ msgstr ""
14
  "X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_html_e;esc_attr__;"
15
  "esc_attr_e\n"
16
  "X-Poedit-Basepath: ..\n"
17
- "X-Generator: Poedit 2.2\n"
18
  "X-Poedit-SourceCharset: UTF-8\n"
19
  "X-Poedit-SearchPath-0: .\n"
20
 
@@ -46,6 +46,115 @@ msgid ""
46
  "\"%2$s\" target=\"_blank\">WordPress.org</a>"
47
  msgstr ""
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  #: includes/admin/default-settings.php:62
50
  msgid "Cache posts only"
51
  msgstr ""
@@ -235,7 +344,7 @@ msgid "No related posts found"
235
  msgstr ""
236
 
237
  #: includes/admin/default-settings.php:210
238
- #: includes/admin/default-settings.php:640
239
  msgid "Show post excerpt"
240
  msgstr ""
241
 
@@ -249,20 +358,12 @@ msgstr ""
249
  msgid "Length of excerpt (in words)"
250
  msgstr ""
251
 
252
- #: includes/admin/default-settings.php:226
253
- msgid "Show date"
254
- msgstr ""
255
-
256
  #: includes/admin/default-settings.php:227
257
  msgid ""
258
  "Displays the date of the post. Uses the same date format set in General "
259
  "Options."
260
  msgstr ""
261
 
262
- #: includes/admin/default-settings.php:233
263
- msgid "Show author"
264
- msgstr ""
265
-
266
  #: includes/admin/default-settings.php:240
267
  msgid "Limit post title length (in characters)"
268
  msgstr ""
@@ -324,7 +425,7 @@ msgid "After each list item"
324
  msgstr ""
325
 
326
  #: includes/admin/default-settings.php:339
327
- #: includes/admin/default-settings.php:631
328
  msgid "Number of posts to display"
329
  msgstr ""
330
 
@@ -346,26 +447,11 @@ msgid ""
346
  msgstr ""
347
 
348
  #: includes/admin/default-settings.php:356
 
349
  msgid "Order posts"
350
  msgstr ""
351
 
352
- #: includes/admin/default-settings.php:361
353
- msgid "By relevance"
354
- msgstr ""
355
-
356
- #: includes/admin/default-settings.php:362
357
- msgid "Randomly"
358
- msgstr ""
359
-
360
- #: includes/admin/default-settings.php:363
361
- msgid "By date"
362
- msgstr ""
363
-
364
- #: includes/admin/default-settings.php:368
365
- msgid "Randomize posts"
366
- msgstr ""
367
-
368
- #: includes/admin/default-settings.php:369
369
  msgid ""
370
  "This shuffles the selected related posts. If you select to order by date in "
371
  "the previous option, then the related posts will first be sorted by date and "
@@ -373,86 +459,86 @@ msgid ""
373
  "enabled."
374
  msgstr ""
375
 
376
- #: includes/admin/default-settings.php:375
377
  msgid "Related posts based on title and content"
378
  msgstr ""
379
 
380
- #: includes/admin/default-settings.php:376
381
  msgid ""
382
  "If unchecked, only posts titles are used. Enable the cache if enabling this "
383
  "option for better performance. Each site is different, so toggle this option "
384
  "to see which setting gives you better quality related posts."
385
  msgstr ""
386
 
387
- #: includes/admin/default-settings.php:382
388
  msgid "Limit content to be compared"
389
  msgstr ""
390
 
391
- #: includes/admin/default-settings.php:383
392
  msgid ""
393
  "This sets the maximum words of the content that will be matched. Set to 0 "
394
  "for no limit. Max value: 2,000. Only applies if you activate the above "
395
  "option."
396
  msgstr ""
397
 
398
- #: includes/admin/default-settings.php:391
399
- #: includes/modules/class-crp-widget.php:126
400
  msgid "Post types to include"
401
  msgstr ""
402
 
403
- #: includes/admin/default-settings.php:392
404
  msgid ""
405
  "At least one option should be selected above. Select which post types you "
406
  "want to include in the list of posts. This field can be overridden using a "
407
  "comma separated list of post types when using the manual display."
408
  msgstr ""
409
 
410
- #: includes/admin/default-settings.php:398
411
  msgid "Limit to same post type"
412
  msgstr ""
413
 
414
- #: includes/admin/default-settings.php:399
415
  msgid ""
416
  "If checked, the related posts will only be selected from the same post type "
417
  "of the current post."
418
  msgstr ""
419
 
420
- #: includes/admin/default-settings.php:405
421
  msgid "Limit to same author"
422
  msgstr ""
423
 
424
- #: includes/admin/default-settings.php:406
425
  msgid ""
426
  "If checked, the related posts will only be selected from the same author of "
427
  "the current post."
428
  msgstr ""
429
 
430
- #: includes/admin/default-settings.php:412
431
  msgid "Post/page IDs to exclude"
432
  msgstr ""
433
 
434
- #: includes/admin/default-settings.php:413
435
  msgid ""
436
  "Comma-separated list of post or page IDs to exclude from the list. e.g. "
437
  "188,320,500"
438
  msgstr ""
439
 
440
- #: includes/admin/default-settings.php:419
441
  msgid "Exclude Categories"
442
  msgstr ""
443
 
444
- #: includes/admin/default-settings.php:420
445
  msgid ""
446
  "Comma separated list of category slugs. The field above has an autocomplete "
447
  "so simply start typing in the starting letters and it will prompt you with "
448
  "options. Does not support custom taxonomies."
449
  msgstr ""
450
 
451
- #: includes/admin/default-settings.php:431
452
  msgid "Exclude category IDs"
453
  msgstr ""
454
 
455
- #: includes/admin/default-settings.php:432
456
  msgid ""
457
  "This is a readonly field that is automatically populated based on the above "
458
  "input when the settings are saved. These might differ from the IDs visible "
@@ -460,36 +546,36 @@ msgid ""
460
  "the term_taxonomy_id which is unique to this taxonomy."
461
  msgstr ""
462
 
463
- #: includes/admin/default-settings.php:462
464
- #: includes/admin/default-settings.php:647
465
  msgid "Location of the post thumbnail"
466
  msgstr ""
467
 
468
- #: includes/admin/default-settings.php:467
469
- #: includes/admin/default-settings.php:652
470
  msgid "Display thumbnails inline with posts, before title"
471
  msgstr ""
472
 
473
- #: includes/admin/default-settings.php:468
474
- #: includes/admin/default-settings.php:653
475
  msgid "Display thumbnails inline with posts, after title"
476
  msgstr ""
477
 
478
- #: includes/admin/default-settings.php:469
479
- #: includes/admin/default-settings.php:654
480
  msgid "Display only thumbnails, no text"
481
  msgstr ""
482
 
483
- #: includes/admin/default-settings.php:470
484
- #: includes/admin/default-settings.php:655
485
  msgid "Do not display thumbnails, only text"
486
  msgstr ""
487
 
488
- #: includes/admin/default-settings.php:475
489
  msgid "Thumbnail size"
490
  msgstr ""
491
 
492
- #: includes/admin/default-settings.php:476
493
  msgid ""
494
  "You can choose from existing image sizes above or create a custom size. If "
495
  "you have chosen Custom size above, then enter the width, height and crop "
@@ -497,125 +583,125 @@ msgid ""
497
  "width and/or height below, existing images will not be automatically resized."
498
  msgstr ""
499
 
500
- #: includes/admin/default-settings.php:478
501
  #, php-format
502
  msgid "I recommend using %1$s or %2$s to regenerate all image sizes."
503
  msgstr ""
504
 
505
- #: includes/admin/default-settings.php:488
506
- #: includes/admin/default-settings.php:660
507
- #: includes/modules/class-crp-widget.php:122
508
  msgid "Thumbnail width"
509
  msgstr ""
510
 
511
- #: includes/admin/default-settings.php:497
512
- #: includes/admin/default-settings.php:669
513
- #: includes/modules/class-crp-widget.php:117
514
  msgid "Thumbnail height"
515
  msgstr ""
516
 
517
- #: includes/admin/default-settings.php:506
518
  msgid "Hard crop thumbnails"
519
  msgstr ""
520
 
521
- #: includes/admin/default-settings.php:507
522
  msgid ""
523
  "Check this box to hard crop the thumbnails. i.e. force the width and height "
524
  "above vs. maintaining proportions."
525
  msgstr ""
526
 
527
- #: includes/admin/default-settings.php:513
528
  msgid "Generate thumbnail sizes"
529
  msgstr ""
530
 
531
- #: includes/admin/default-settings.php:514
532
  msgid ""
533
  "If you select this option and Custom size is selected above, the plugin will "
534
  "register the image size with WordPress to create new thumbnails. Does not "
535
  "update old images as explained above."
536
  msgstr ""
537
 
538
- #: includes/admin/default-settings.php:520
539
  msgid "Thumbnail size attributes"
540
  msgstr ""
541
 
542
- #: includes/admin/default-settings.php:526
543
  #, php-format
544
  msgid "Use CSS to set the width and height: e.g. %s"
545
  msgstr ""
546
 
547
- #: includes/admin/default-settings.php:528
548
  #, php-format
549
  msgid "Use HTML attributes to set the width and height: e.g. %s"
550
  msgstr ""
551
 
552
- #: includes/admin/default-settings.php:529
553
  msgid ""
554
  "No width or height set. You will need to use external styles to force any "
555
  "width or height of your choice."
556
  msgstr ""
557
 
558
- #: includes/admin/default-settings.php:534
559
  msgid "Thumbnail meta field name"
560
  msgstr ""
561
 
562
- #: includes/admin/default-settings.php:535
563
  msgid ""
564
  "The value of this field should contain the URL of the image and can be set "
565
  "in the metabox in the Edit Post screen"
566
  msgstr ""
567
 
568
- #: includes/admin/default-settings.php:541
569
  msgid "Get first image"
570
  msgstr ""
571
 
572
- #: includes/admin/default-settings.php:542
573
  msgid ""
574
  "The plugin will fetch the first image in the post content if this is "
575
  "enabled. This can slow down the loading of your page if the first image in "
576
  "the followed posts is large in file-size."
577
  msgstr ""
578
 
579
- #: includes/admin/default-settings.php:548
580
  msgid "Use default thumbnail?"
581
  msgstr ""
582
 
583
- #: includes/admin/default-settings.php:549
584
  msgid ""
585
  "If checked, when no thumbnail is found, show a default one from the URL "
586
  "below. If not checked and no thumbnail is found, no image will be shown."
587
  msgstr ""
588
 
589
- #: includes/admin/default-settings.php:555 includes/admin/settings-page.php:746
590
  msgid "Default thumbnail"
591
  msgstr ""
592
 
593
- #: includes/admin/default-settings.php:556
594
  msgid ""
595
  "Enter the full URL of the image that you wish to display if no thumbnail is "
596
  "found. This image will be displayed below."
597
  msgstr ""
598
 
599
- #: includes/admin/default-settings.php:586
600
  msgid "Related Posts style"
601
  msgstr ""
602
 
603
- #: includes/admin/default-settings.php:594
604
  msgid "Custom CSS"
605
  msgstr ""
606
 
607
- #: includes/admin/default-settings.php:596
608
  #, php-format
609
  msgid ""
610
  "Do not include %3$sstyle%4$s tags. Check out the %1$sFAQ%2$s for available "
611
  "CSS classes to style."
612
  msgstr ""
613
 
614
- #: includes/admin/default-settings.php:625
615
  msgid "About this tab"
616
  msgstr ""
617
 
618
- #: includes/admin/default-settings.php:626
619
  msgid ""
620
  "Below options override the related posts settings for your blog feed. These "
621
  "only apply if you have selected to add related posts to Feeds in the General "
@@ -623,33 +709,45 @@ msgid ""
623
  "way to style the related posts in the feed."
624
  msgstr ""
625
 
626
- #: includes/admin/default-settings.php:746
627
  msgid "No styles"
628
  msgstr ""
629
 
630
- #: includes/admin/default-settings.php:747
631
  msgid "Select this option if you plan to add your own styles"
632
  msgstr ""
633
 
634
- #: includes/admin/default-settings.php:751
635
  msgid "Text only"
636
  msgstr ""
637
 
638
- #: includes/admin/default-settings.php:752
639
  msgid "Disable thumbnails and no longer include the default style sheet"
640
  msgstr ""
641
 
642
- #: includes/admin/default-settings.php:756
643
  msgid "Rounded thumbnails"
644
  msgstr ""
645
 
646
- #: includes/admin/default-settings.php:757
647
  msgid ""
648
  "Enabling this option will turn on the thumbnails and force their width and "
649
  "height. It will also turn off the display of the author, excerpt and date if "
650
  "already enabled. Disabling this option will not revert any settings."
651
  msgstr ""
652
 
 
 
 
 
 
 
 
 
 
 
 
 
653
  #: includes/admin/help-tab.php:35 includes/admin/help-tab.php:126
654
  #, php-format
655
  msgid ""
@@ -802,66 +900,78 @@ msgstr ""
802
  msgid "Contribute"
803
  msgstr ""
804
 
805
- #: includes/admin/modules/metabox.php:108
806
  msgid "Disable Related Posts display:"
807
  msgstr ""
808
 
809
- #: includes/admin/modules/metabox.php:111
810
  msgid ""
811
  "If this is checked, then Contextual Related Posts will not automatically "
812
  "insert the related posts at the end of post content."
813
  msgstr ""
814
 
815
- #: includes/admin/modules/metabox.php:115
816
  msgid "Exclude this post from the related posts list:"
817
  msgstr ""
818
 
819
- #: includes/admin/modules/metabox.php:118
820
  msgid ""
821
  "If this is checked, then this post will be excluded from the popular posts "
822
  "list."
823
  msgstr ""
824
 
825
- #: includes/admin/modules/metabox.php:122
826
- #: includes/admin/modules/metabox.php:130
 
 
 
 
 
 
 
 
 
 
 
 
827
  msgid "Manual related posts:"
828
  msgstr ""
829
 
830
- #: includes/admin/modules/metabox.php:124
831
  msgid ""
832
  "Comma separated list of post, page or custom post type IDs. e.g. "
833
  "188,320,500. These will be given preference over the related posts generated "
834
  "by the plugin."
835
  msgstr ""
836
 
837
- #: includes/admin/modules/metabox.php:125
838
  msgid ""
839
  "Once you enter the list above and save this page, the plugin will display "
840
  "the titles of the posts below for your reference. Only IDs corresponding to "
841
  "published posts or custom post types will be retained."
842
  msgstr ""
843
 
844
- #: includes/admin/modules/metabox.php:141
845
  #, php-format
846
  msgid "This post type is: %s"
847
  msgstr ""
848
 
849
- #: includes/admin/modules/metabox.php:152
850
  msgid "Location of thumbnail"
851
  msgstr ""
852
 
853
- #: includes/admin/modules/metabox.php:154
854
  msgid ""
855
  "Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
856
  "image will be used for the post. It will be resized to the thumbnail size "
857
  "set under Settings &raquo; Related Posts &raquo; Output Options"
858
  msgstr ""
859
 
860
- #: includes/admin/modules/metabox.php:155
861
  msgid "The URL above is saved in the meta field:"
862
  msgstr ""
863
 
864
- #: includes/admin/modules/metabox.php:160
865
  msgid ""
866
  "You have Top 10 WordPress Plugin installed. If you are trying to modify the "
867
  "thumbnail, then you'll need to make the same change in the Top 10 meta box "
@@ -989,6 +1099,19 @@ msgstr ""
989
  msgid "Modified from default setting"
990
  msgstr ""
991
 
 
 
 
 
 
 
 
 
 
 
 
 
 
992
  #: includes/admin/sidebar.php:20
993
  msgid "Support the development"
994
  msgstr ""
@@ -1041,7 +1164,7 @@ msgstr ""
1041
  msgid "<h3>Related Posts:</h3>"
1042
  msgstr ""
1043
 
1044
- #: includes/main-query.php:195
1045
  #, php-format
1046
  msgid "Powered by <a href=\"%s\" rel=\"nofollow\">Contextual Related Posts</a>"
1047
  msgstr ""
@@ -1058,58 +1181,46 @@ msgstr ""
1058
  msgid "filter argument has been deprecated"
1059
  msgstr ""
1060
 
1061
- #: includes/modules/class-crp-widget.php:32
1062
- msgid "Related Posts [CRP]"
1063
- msgstr ""
1064
-
1065
  #: includes/modules/class-crp-widget.php:34
1066
  msgid "Display Related Posts"
1067
  msgstr ""
1068
 
1069
- #: includes/modules/class-crp-widget.php:78
1070
- msgid "Title"
1071
- msgstr ""
1072
-
1073
  #: includes/modules/class-crp-widget.php:83
1074
- msgid "No. of posts"
1075
- msgstr ""
1076
-
1077
- #: includes/modules/class-crp-widget.php:88
1078
- msgid "Offset"
1079
  msgstr ""
1080
 
1081
- #: includes/modules/class-crp-widget.php:93
1082
  msgid " Show excerpt?"
1083
  msgstr ""
1084
 
1085
- #: includes/modules/class-crp-widget.php:98
1086
  msgid " Show author?"
1087
  msgstr ""
1088
 
1089
- #: includes/modules/class-crp-widget.php:103
1090
  msgid " Show date?"
1091
  msgstr ""
1092
 
1093
- #: includes/modules/class-crp-widget.php:107
1094
- msgid "Thumbnail options"
1095
- msgstr ""
1096
-
1097
- #: includes/modules/class-crp-widget.php:109
1098
  msgid "Thumbnails inline, before title"
1099
  msgstr ""
1100
 
1101
- #: includes/modules/class-crp-widget.php:110
1102
  msgid "Thumbnails inline, after title"
1103
  msgstr ""
1104
 
1105
- #: includes/modules/class-crp-widget.php:111
1106
  msgid "Only thumbnails, no text"
1107
  msgstr ""
1108
 
1109
- #: includes/modules/class-crp-widget.php:112
1110
  msgid "No thumbnails, only text."
1111
  msgstr ""
1112
 
 
 
 
 
1113
  #: includes/output-generator.php:239
1114
  msgid " by "
1115
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: Contextual Related Posts\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2019-12-30 14:25+0530\n"
7
  "PO-Revision-Date: \n"
8
  "Last-Translator: Ajay D'Souza\n"
9
  "Language-Team: plugins@webberzone.com\n"
14
  "X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_html_e;esc_attr__;"
15
  "esc_attr_e\n"
16
  "X-Poedit-Basepath: ..\n"
17
+ "X-Generator: Poedit 2.2.4\n"
18
  "X-Poedit-SourceCharset: UTF-8\n"
19
  "X-Poedit-SearchPath-0: .\n"
20
 
46
  "\"%2$s\" target=\"_blank\">WordPress.org</a>"
47
  msgstr ""
48
 
49
+ #: includes/admin/blocks/related-posts/index.js:22
50
+ #: includes/admin/blocks/related-posts/index.min.js:1
51
+ #: includes/modules/class-crp-widget.php:32
52
+ msgid "Related Posts [CRP]"
53
+ msgstr ""
54
+
55
+ #: includes/admin/blocks/related-posts/index.js:23
56
+ #: includes/admin/blocks/related-posts/index.min.js:1
57
+ msgid "Display related posts by Contextual Related Posts"
58
+ msgstr ""
59
+
60
+ #: includes/admin/blocks/related-posts/index.js:26
61
+ #: includes/admin/blocks/related-posts/index.min.js:1
62
+ msgid "related posts"
63
+ msgstr ""
64
+
65
+ #: includes/admin/blocks/related-posts/index.js:26
66
+ #: includes/admin/blocks/related-posts/index.min.js:1
67
+ msgid "contextual"
68
+ msgstr ""
69
+
70
+ #: includes/admin/blocks/related-posts/index.js:26
71
+ #: includes/admin/blocks/related-posts/index.min.js:1
72
+ msgid "posts"
73
+ msgstr ""
74
+
75
+ #: includes/admin/blocks/related-posts/index.js:141
76
+ #: includes/admin/blocks/related-posts/index.min.js:1
77
+ msgid "Show heading"
78
+ msgstr ""
79
+
80
+ #: includes/admin/blocks/related-posts/index.js:146
81
+ #: includes/admin/blocks/related-posts/index.min.js:1
82
+ #: includes/modules/class-crp-widget.php:88
83
+ msgid "No. of posts"
84
+ msgstr ""
85
+
86
+ #: includes/admin/blocks/related-posts/index.js:157
87
+ #: includes/admin/blocks/related-posts/index.min.js:1
88
+ #: includes/modules/class-crp-widget.php:93
89
+ msgid "Offset"
90
+ msgstr ""
91
+
92
+ #: includes/admin/blocks/related-posts/index.js:168
93
+ #: includes/admin/blocks/related-posts/index.min.js:1
94
+ msgid "Show excerpt"
95
+ msgstr ""
96
+
97
+ #: includes/admin/blocks/related-posts/index.js:173
98
+ #: includes/admin/blocks/related-posts/index.min.js:1
99
+ #: includes/admin/default-settings.php:233
100
+ msgid "Show author"
101
+ msgstr ""
102
+
103
+ #: includes/admin/blocks/related-posts/index.js:178
104
+ #: includes/admin/blocks/related-posts/index.min.js:1
105
+ #: includes/admin/default-settings.php:226
106
+ msgid "Show date"
107
+ msgstr ""
108
+
109
+ #: includes/admin/blocks/related-posts/index.js:184
110
+ #: includes/admin/blocks/related-posts/index.min.js:1
111
+ #: includes/modules/class-crp-widget.php:112
112
+ msgid "Thumbnail options"
113
+ msgstr ""
114
+
115
+ #: includes/admin/blocks/related-posts/index.js:187
116
+ #: includes/admin/blocks/related-posts/index.min.js:1
117
+ msgid "Before title"
118
+ msgstr ""
119
+
120
+ #: includes/admin/blocks/related-posts/index.js:188
121
+ #: includes/admin/blocks/related-posts/index.min.js:1
122
+ msgid "After title"
123
+ msgstr ""
124
+
125
+ #: includes/admin/blocks/related-posts/index.js:189
126
+ #: includes/admin/blocks/related-posts/index.min.js:1
127
+ msgid "Only thumbnail"
128
+ msgstr ""
129
+
130
+ #: includes/admin/blocks/related-posts/index.js:190
131
+ #: includes/admin/blocks/related-posts/index.min.js:1
132
+ msgid "Only text"
133
+ msgstr ""
134
+
135
+ #: includes/admin/blocks/related-posts/index.js:195
136
+ #: includes/admin/blocks/related-posts/index.min.js:1
137
+ msgid "Ordering"
138
+ msgstr ""
139
+
140
+ #: includes/admin/blocks/related-posts/index.js:200
141
+ #: includes/admin/blocks/related-posts/index.min.js:1
142
+ #: includes/admin/default-settings.php:364
143
+ msgid "Randomize posts"
144
+ msgstr ""
145
+
146
+ #: includes/admin/blocks/related-posts/index.js:205
147
+ #: includes/admin/blocks/related-posts/index.min.js:1
148
+ msgid "Other attributes"
149
+ msgstr ""
150
+
151
+ #: includes/admin/blocks/related-posts/index.js:206
152
+ #: includes/admin/blocks/related-posts/index.min.js:1
153
+ msgid ""
154
+ "Enter other attributes in a URL-style string-query. e.g. post_types=post,"
155
+ "page&link_nofollow=1&exclude_post_ids=5,6"
156
+ msgstr ""
157
+
158
  #: includes/admin/default-settings.php:62
159
  msgid "Cache posts only"
160
  msgstr ""
344
  msgstr ""
345
 
346
  #: includes/admin/default-settings.php:210
347
+ #: includes/admin/default-settings.php:636
348
  msgid "Show post excerpt"
349
  msgstr ""
350
 
358
  msgid "Length of excerpt (in words)"
359
  msgstr ""
360
 
 
 
 
 
361
  #: includes/admin/default-settings.php:227
362
  msgid ""
363
  "Displays the date of the post. Uses the same date format set in General "
364
  "Options."
365
  msgstr ""
366
 
 
 
 
 
367
  #: includes/admin/default-settings.php:240
368
  msgid "Limit post title length (in characters)"
369
  msgstr ""
425
  msgstr ""
426
 
427
  #: includes/admin/default-settings.php:339
428
+ #: includes/admin/default-settings.php:627
429
  msgid "Number of posts to display"
430
  msgstr ""
431
 
447
  msgstr ""
448
 
449
  #: includes/admin/default-settings.php:356
450
+ #: includes/modules/class-crp-widget.php:130
451
  msgid "Order posts"
452
  msgstr ""
453
 
454
+ #: includes/admin/default-settings.php:365
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
455
  msgid ""
456
  "This shuffles the selected related posts. If you select to order by date in "
457
  "the previous option, then the related posts will first be sorted by date and "
459
  "enabled."
460
  msgstr ""
461
 
462
+ #: includes/admin/default-settings.php:371
463
  msgid "Related posts based on title and content"
464
  msgstr ""
465
 
466
+ #: includes/admin/default-settings.php:372
467
  msgid ""
468
  "If unchecked, only posts titles are used. Enable the cache if enabling this "
469
  "option for better performance. Each site is different, so toggle this option "
470
  "to see which setting gives you better quality related posts."
471
  msgstr ""
472
 
473
+ #: includes/admin/default-settings.php:378
474
  msgid "Limit content to be compared"
475
  msgstr ""
476
 
477
+ #: includes/admin/default-settings.php:379
478
  msgid ""
479
  "This sets the maximum words of the content that will be matched. Set to 0 "
480
  "for no limit. Max value: 2,000. Only applies if you activate the above "
481
  "option."
482
  msgstr ""
483
 
484
+ #: includes/admin/default-settings.php:387
485
+ #: includes/modules/class-crp-widget.php:147
486
  msgid "Post types to include"
487
  msgstr ""
488
 
489
+ #: includes/admin/default-settings.php:388
490
  msgid ""
491
  "At least one option should be selected above. Select which post types you "
492
  "want to include in the list of posts. This field can be overridden using a "
493
  "comma separated list of post types when using the manual display."
494
  msgstr ""
495
 
496
+ #: includes/admin/default-settings.php:394
497
  msgid "Limit to same post type"
498
  msgstr ""
499
 
500
+ #: includes/admin/default-settings.php:395
501
  msgid ""
502
  "If checked, the related posts will only be selected from the same post type "
503
  "of the current post."
504
  msgstr ""
505
 
506
+ #: includes/admin/default-settings.php:401
507
  msgid "Limit to same author"
508
  msgstr ""
509
 
510
+ #: includes/admin/default-settings.php:402
511
  msgid ""
512
  "If checked, the related posts will only be selected from the same author of "
513
  "the current post."
514
  msgstr ""
515
 
516
+ #: includes/admin/default-settings.php:408
517
  msgid "Post/page IDs to exclude"
518
  msgstr ""
519
 
520
+ #: includes/admin/default-settings.php:409
521
  msgid ""
522
  "Comma-separated list of post or page IDs to exclude from the list. e.g. "
523
  "188,320,500"
524
  msgstr ""
525
 
526
+ #: includes/admin/default-settings.php:415
527
  msgid "Exclude Categories"
528
  msgstr ""
529
 
530
+ #: includes/admin/default-settings.php:416
531
  msgid ""
532
  "Comma separated list of category slugs. The field above has an autocomplete "
533
  "so simply start typing in the starting letters and it will prompt you with "
534
  "options. Does not support custom taxonomies."
535
  msgstr ""
536
 
537
+ #: includes/admin/default-settings.php:427
538
  msgid "Exclude category IDs"
539
  msgstr ""
540
 
541
+ #: includes/admin/default-settings.php:428
542
  msgid ""
543
  "This is a readonly field that is automatically populated based on the above "
544
  "input when the settings are saved. These might differ from the IDs visible "
546
  "the term_taxonomy_id which is unique to this taxonomy."
547
  msgstr ""
548
 
549
+ #: includes/admin/default-settings.php:458
550
+ #: includes/admin/default-settings.php:643
551
  msgid "Location of the post thumbnail"
552
  msgstr ""
553
 
554
+ #: includes/admin/default-settings.php:463
555
+ #: includes/admin/default-settings.php:648
556
  msgid "Display thumbnails inline with posts, before title"
557
  msgstr ""
558
 
559
+ #: includes/admin/default-settings.php:464
560
+ #: includes/admin/default-settings.php:649
561
  msgid "Display thumbnails inline with posts, after title"
562
  msgstr ""
563
 
564
+ #: includes/admin/default-settings.php:465
565
+ #: includes/admin/default-settings.php:650
566
  msgid "Display only thumbnails, no text"
567
  msgstr ""
568
 
569
+ #: includes/admin/default-settings.php:466
570
+ #: includes/admin/default-settings.php:651
571
  msgid "Do not display thumbnails, only text"
572
  msgstr ""
573
 
574
+ #: includes/admin/default-settings.php:471
575
  msgid "Thumbnail size"
576
  msgstr ""
577
 
578
+ #: includes/admin/default-settings.php:472
579
  msgid ""
580
  "You can choose from existing image sizes above or create a custom size. If "
581
  "you have chosen Custom size above, then enter the width, height and crop "
583
  "width and/or height below, existing images will not be automatically resized."
584
  msgstr ""
585
 
586
+ #: includes/admin/default-settings.php:474
587
  #, php-format
588
  msgid "I recommend using %1$s or %2$s to regenerate all image sizes."
589
  msgstr ""
590
 
591
+ #: includes/admin/default-settings.php:484
592
+ #: includes/admin/default-settings.php:656
593
+ #: includes/modules/class-crp-widget.php:127
594
  msgid "Thumbnail width"
595
  msgstr ""
596
 
597
+ #: includes/admin/default-settings.php:493
598
+ #: includes/admin/default-settings.php:665
599
+ #: includes/modules/class-crp-widget.php:122
600
  msgid "Thumbnail height"
601
  msgstr ""
602
 
603
+ #: includes/admin/default-settings.php:502
604
  msgid "Hard crop thumbnails"
605
  msgstr ""
606
 
607
+ #: includes/admin/default-settings.php:503
608
  msgid ""
609
  "Check this box to hard crop the thumbnails. i.e. force the width and height "
610
  "above vs. maintaining proportions."
611
  msgstr ""
612
 
613
+ #: includes/admin/default-settings.php:509
614
  msgid "Generate thumbnail sizes"
615
  msgstr ""
616
 
617
+ #: includes/admin/default-settings.php:510
618
  msgid ""
619
  "If you select this option and Custom size is selected above, the plugin will "
620
  "register the image size with WordPress to create new thumbnails. Does not "
621
  "update old images as explained above."
622
  msgstr ""
623
 
624
+ #: includes/admin/default-settings.php:516
625
  msgid "Thumbnail size attributes"
626
  msgstr ""
627
 
628
+ #: includes/admin/default-settings.php:522
629
  #, php-format
630
  msgid "Use CSS to set the width and height: e.g. %s"
631
  msgstr ""
632
 
633
+ #: includes/admin/default-settings.php:524
634
  #, php-format
635
  msgid "Use HTML attributes to set the width and height: e.g. %s"
636
  msgstr ""
637
 
638
+ #: includes/admin/default-settings.php:525
639
  msgid ""
640
  "No width or height set. You will need to use external styles to force any "
641
  "width or height of your choice."
642
  msgstr ""
643
 
644
+ #: includes/admin/default-settings.php:530
645
  msgid "Thumbnail meta field name"
646
  msgstr ""
647
 
648
+ #: includes/admin/default-settings.php:531
649
  msgid ""
650
  "The value of this field should contain the URL of the image and can be set "
651
  "in the metabox in the Edit Post screen"
652
  msgstr ""
653
 
654
+ #: includes/admin/default-settings.php:537
655
  msgid "Get first image"
656
  msgstr ""
657
 
658
+ #: includes/admin/default-settings.php:538
659
  msgid ""
660
  "The plugin will fetch the first image in the post content if this is "
661
  "enabled. This can slow down the loading of your page if the first image in "
662
  "the followed posts is large in file-size."
663
  msgstr ""
664
 
665
+ #: includes/admin/default-settings.php:544
666
  msgid "Use default thumbnail?"
667
  msgstr ""
668
 
669
+ #: includes/admin/default-settings.php:545
670
  msgid ""
671
  "If checked, when no thumbnail is found, show a default one from the URL "
672
  "below. If not checked and no thumbnail is found, no image will be shown."
673
  msgstr ""
674
 
675
+ #: includes/admin/default-settings.php:551 includes/admin/settings-page.php:746
676
  msgid "Default thumbnail"
677
  msgstr ""
678
 
679
+ #: includes/admin/default-settings.php:552
680
  msgid ""
681
  "Enter the full URL of the image that you wish to display if no thumbnail is "
682
  "found. This image will be displayed below."
683
  msgstr ""
684
 
685
+ #: includes/admin/default-settings.php:582
686
  msgid "Related Posts style"
687
  msgstr ""
688
 
689
+ #: includes/admin/default-settings.php:590
690
  msgid "Custom CSS"
691
  msgstr ""
692
 
693
+ #: includes/admin/default-settings.php:592
694
  #, php-format
695
  msgid ""
696
  "Do not include %3$sstyle%4$s tags. Check out the %1$sFAQ%2$s for available "
697
  "CSS classes to style."
698
  msgstr ""
699
 
700
+ #: includes/admin/default-settings.php:621
701
  msgid "About this tab"
702
  msgstr ""
703
 
704
+ #: includes/admin/default-settings.php:622
705
  msgid ""
706
  "Below options override the related posts settings for your blog feed. These "
707
  "only apply if you have selected to add related posts to Feeds in the General "
709
  "way to style the related posts in the feed."
710
  msgstr ""
711
 
712
+ #: includes/admin/default-settings.php:742
713
  msgid "No styles"
714
  msgstr ""
715
 
716
+ #: includes/admin/default-settings.php:743
717
  msgid "Select this option if you plan to add your own styles"
718
  msgstr ""
719
 
720
+ #: includes/admin/default-settings.php:747
721
  msgid "Text only"
722
  msgstr ""
723
 
724
+ #: includes/admin/default-settings.php:748
725
  msgid "Disable thumbnails and no longer include the default style sheet"
726
  msgstr ""
727
 
728
+ #: includes/admin/default-settings.php:752
729
  msgid "Rounded thumbnails"
730
  msgstr ""
731
 
732
+ #: includes/admin/default-settings.php:753
733
  msgid ""
734
  "Enabling this option will turn on the thumbnails and force their width and "
735
  "height. It will also turn off the display of the author, excerpt and date if "
736
  "already enabled. Disabling this option will not revert any settings."
737
  msgstr ""
738
 
739
+ #: includes/admin/default-settings.php:776
740
+ msgid "By relevance"
741
+ msgstr ""
742
+
743
+ #: includes/admin/default-settings.php:777
744
+ msgid "Randomly"
745
+ msgstr ""
746
+
747
+ #: includes/admin/default-settings.php:778
748
+ msgid "By date"
749
+ msgstr ""
750
+
751
  #: includes/admin/help-tab.php:35 includes/admin/help-tab.php:126
752
  #, php-format
753
  msgid ""
900
  msgid "Contribute"
901
  msgstr ""
902
 
903
+ #: includes/admin/modules/metabox.php:115
904
  msgid "Disable Related Posts display:"
905
  msgstr ""
906
 
907
+ #: includes/admin/modules/metabox.php:118
908
  msgid ""
909
  "If this is checked, then Contextual Related Posts will not automatically "
910
  "insert the related posts at the end of post content."
911
  msgstr ""
912
 
913
+ #: includes/admin/modules/metabox.php:122
914
  msgid "Exclude this post from the related posts list:"
915
  msgstr ""
916
 
917
+ #: includes/admin/modules/metabox.php:125
918
  msgid ""
919
  "If this is checked, then this post will be excluded from the popular posts "
920
  "list."
921
  msgstr ""
922
 
923
+ #: includes/admin/modules/metabox.php:129
924
+ msgid "Keyword:"
925
+ msgstr ""
926
+
927
+ #: includes/admin/modules/metabox.php:131
928
+ msgid ""
929
+ "Enter either a word or a phrase that will be used to find related posts. If "
930
+ "entered, the plugin will continue to search the `post_title` and "
931
+ "`post_content` fields but will use this keyword instead of the values of the "
932
+ "title and content of this post."
933
+ msgstr ""
934
+
935
+ #: includes/admin/modules/metabox.php:135
936
+ #: includes/admin/modules/metabox.php:143
937
  msgid "Manual related posts:"
938
  msgstr ""
939
 
940
+ #: includes/admin/modules/metabox.php:137
941
  msgid ""
942
  "Comma separated list of post, page or custom post type IDs. e.g. "
943
  "188,320,500. These will be given preference over the related posts generated "
944
  "by the plugin."
945
  msgstr ""
946
 
947
+ #: includes/admin/modules/metabox.php:138
948
  msgid ""
949
  "Once you enter the list above and save this page, the plugin will display "
950
  "the titles of the posts below for your reference. Only IDs corresponding to "
951
  "published posts or custom post types will be retained."
952
  msgstr ""
953
 
954
+ #: includes/admin/modules/metabox.php:154
955
  #, php-format
956
  msgid "This post type is: %s"
957
  msgstr ""
958
 
959
+ #: includes/admin/modules/metabox.php:165
960
  msgid "Location of thumbnail"
961
  msgstr ""
962
 
963
+ #: includes/admin/modules/metabox.php:167
964
  msgid ""
965
  "Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
966
  "image will be used for the post. It will be resized to the thumbnail size "
967
  "set under Settings &raquo; Related Posts &raquo; Output Options"
968
  msgstr ""
969
 
970
+ #: includes/admin/modules/metabox.php:168
971
  msgid "The URL above is saved in the meta field:"
972
  msgstr ""
973
 
974
+ #: includes/admin/modules/metabox.php:173
975
  msgid ""
976
  "You have Top 10 WordPress Plugin installed. If you are trying to modify the "
977
  "thumbnail, then you'll need to make the same change in the Top 10 meta box "
1099
  msgid "Modified from default setting"
1100
  msgstr ""
1101
 
1102
+ #: includes/admin/settings-page.php:768
1103
+ msgid ""
1104
+ "This option cannot be changed because of the selected related posts style. "
1105
+ "To modify this option, you will need to select No styles or Text only in the "
1106
+ "Styles tab"
1107
+ msgstr ""
1108
+
1109
+ #: includes/admin/settings-page.php:772
1110
+ msgid ""
1111
+ "This option cannot be changed because of the selected related posts style. "
1112
+ "To modify this option, you will need to select No styles in the Styles tab"
1113
+ msgstr ""
1114
+
1115
  #: includes/admin/sidebar.php:20
1116
  msgid "Support the development"
1117
  msgstr ""
1164
  msgid "<h3>Related Posts:</h3>"
1165
  msgstr ""
1166
 
1167
+ #: includes/main-query.php:201
1168
  #, php-format
1169
  msgid "Powered by <a href=\"%s\" rel=\"nofollow\">Contextual Related Posts</a>"
1170
  msgstr ""
1181
  msgid "filter argument has been deprecated"
1182
  msgstr ""
1183
 
 
 
 
 
1184
  #: includes/modules/class-crp-widget.php:34
1185
  msgid "Display Related Posts"
1186
  msgstr ""
1187
 
 
 
 
 
1188
  #: includes/modules/class-crp-widget.php:83
1189
+ msgid "Title"
 
 
 
 
1190
  msgstr ""
1191
 
1192
+ #: includes/modules/class-crp-widget.php:98
1193
  msgid " Show excerpt?"
1194
  msgstr ""
1195
 
1196
+ #: includes/modules/class-crp-widget.php:103
1197
  msgid " Show author?"
1198
  msgstr ""
1199
 
1200
+ #: includes/modules/class-crp-widget.php:108
1201
  msgid " Show date?"
1202
  msgstr ""
1203
 
1204
+ #: includes/modules/class-crp-widget.php:114
 
 
 
 
1205
  msgid "Thumbnails inline, before title"
1206
  msgstr ""
1207
 
1208
+ #: includes/modules/class-crp-widget.php:115
1209
  msgid "Thumbnails inline, after title"
1210
  msgstr ""
1211
 
1212
+ #: includes/modules/class-crp-widget.php:116
1213
  msgid "Only thumbnails, no text"
1214
  msgstr ""
1215
 
1216
+ #: includes/modules/class-crp-widget.php:117
1217
  msgid "No thumbnails, only text."
1218
  msgstr ""
1219
 
1220
+ #: includes/modules/class-crp-widget.php:144
1221
+ msgid " Randomize posts"
1222
+ msgstr ""
1223
+
1224
  #: includes/output-generator.php:239
1225
  msgid " by "
1226
  msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: related posts, related, related articles, contextual related posts, simila
3
  Contributors: webberzone, Ajay
4
  Donate link: https://ajaydsouza.com/donate/
5
  Stable tag: trunk
6
- Requires at least: 4.7
7
- Tested up to: 5.2
8
  License: GPLv2 or later
9
 
10
  Add related posts to your WordPress site with inbuilt caching. Supports thumbnails, shortcodes, widgets and custom post types!
@@ -22,11 +22,12 @@ And the default inbuilt styles allow you to switch between gorgeous thumbnail-ri
22
  = Key features =
23
 
24
  * **Automatic**: CRP will start displaying related posts on your site and feed automatically after the content when you activate the plugin. No need to edit template files
25
- * **Manual install**: Want more control over placement? Check the [FAQ](http://wordpress.org/extend/plugins/contextual-related-posts/faq/) on which functions are available for manual install.
26
- * **Caching**: Related posts output is automatically cached as visitors browse through your site
27
  * **Widgets**: Add related posts to widgetized area of your theme. Lots of options available
28
  * **Shortcode**: Use `[crp]` to display the posts anywhere you want in the post content
29
  * **The algorithm**: Find related posts by title and/or content of the current post
 
30
  * **Exclusions**: Exclude posts from categories from being displayed in the list. Or you can exclude posts or pages by ID
31
  * **Custom post types**: The related posts list lets you include posts, pages, attachments or any other custom post type!
32
  * **Thumbnail support**:
@@ -96,6 +97,7 @@ Contextual Related Posts is available for [translation directly on WordPress.org
96
  8. Contextual Related Post metabox in the Edit Posts screen
97
  9. CRP Widget
98
  10. Tools page
 
99
 
100
  == Frequently Asked Questions ==
101
 
@@ -164,85 +166,28 @@ Parameters:
164
 
165
  = Shortcodes =
166
 
167
- You can insert the related posts anywhere in your post using the `[crp]` shortcode. The plugin takes three optional attributes `limit`, `heading` and `cache` as follows:
168
-
169
- `[crp limit="5" heading="1" cache="1"]`
170
-
171
- *limit* : Maximum number of posts to return. The actual number displayed may be lower depending on the matching algorithm and the category / post exclusion settings.
172
-
173
- *heading* : By default, the heading you specify in **Title of related posts:** under **Output options** will be displayed. You can override this by specifying your own heading e.g.
174
-
175
- `
176
- <h3>Similar posts</h3>
177
- [crp limit="2" heading="0"]
178
- `
179
- *cache* : Cache the output or not? By default the output will be cached for the post you add the shortcode in. You can override this by specifying `cache=0`
180
-
181
- In addition to the above, the shortcode takes every option that the plugin supports. See `crp_default_options()` function to see the options that can be set.
182
 
183
 
184
  == Changelog ==
185
 
186
- = 2.7.0 =
187
-
188
- Release post: [https://wzn.io/2XUCur8](https://wzn.io/2XUCur8)
189
-
190
- * Features:
191
- * Caching improvements: "Enable cache" has been renamed to "Cache HTML output". New option "Cache posts only" has been introduced to cache the output of the database query (array of posts)
192
- * New option to order posts by relevance, dates or randomly
193
- * New option to limit posts by the same author
194
- * Thumbnail HTML markup includes `srcset` and `sizes` attributes when available. Read [Responsive Images in WordPress 4.4](https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/)
195
-
196
- * Enhancements:
197
- * No longer use `get_the_title`. You can use `crp_title` and/or `crp_thumb_title` filters to edit the post title and the alt/title attributes of the thumbnail respectively
198
- * Selecting Rounded thumbnails under Styles tab will allow your thumbnail setting to either be "inline before text" or "only thumbnails, no text"
199
-
200
- = 2.6.3 =
201
-
202
- Release post: [https://wzn.io/2VrGdOR](https://wzn.io/2VrGdOR)
203
-
204
- * Enhancements:
205
- * Optimized versions of default.png and default2.png
206
-
207
- * Bug fixes:
208
- * Fixed PHP error when viewing feed
209
- * "Exclude categories" setting wouldn't save properly
210
- * Delete any deprecated settings on save should work properly
211
- * Clearer messages when saving options and a style is activated
212
-
213
- = 2.6.2 =
214
-
215
- Release post: [https://wzn.io/2K2ohWB](https://wzn.io/2K2ohWB)
216
-
217
- * Bug fixes:
218
- * Fixed PHP fatal error "Can’t use function return value in write context"
219
- * Changed default setting for thumbnail width and height to 150
220
-
221
- = 2.6.1 =
222
 
223
- Release post: [https://wzn.io/2K2ohWB](https://wzn.io/2K2ohWB)
224
 
225
  * Features:
226
- * New options to delete options and/or data on uninstall. This will only work if you visit the Settings page and save the pages.
227
-
228
- * Bug fixes:
229
- * Custom CSS code should now be properly added to the header
230
- * Upgrading settings when "Automatically add related posts to" had no options checked should work properly
231
-
232
- = 2.6.0 =
233
-
234
- Release post: [https://wzn.io/2JZBZJy](https://wzn.io/2JZBZJy)
235
-
236
- * Features:
237
- * Implemented the Settings API for handling plugin settings
238
- * New Tools page: Recreate the indices, delete the cache and delete old settings
239
 
240
  * Enhancements:
241
- * `widget_title` filter includes `$instance` and `id_base` variables
242
 
243
  * Bug fixes:
244
- * Checked for non-zero thumbnail width and height in the widget
245
- * More checks for PHP errors and notices
 
 
246
 
247
  = Earlier versions =
248
 
@@ -251,7 +196,6 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
251
 
252
  == Upgrade Notice ==
253
 
254
- = 2.7.0 =
255
- * More caching control, new options and enhancements.
256
- Check the Changelog for more details
257
-
3
  Contributors: webberzone, Ajay
4
  Donate link: https://ajaydsouza.com/donate/
5
  Stable tag: trunk
6
+ Requires at least: 4.8
7
+ Tested up to: 5.3
8
  License: GPLv2 or later
9
 
10
  Add related posts to your WordPress site with inbuilt caching. Supports thumbnails, shortcodes, widgets and custom post types!
22
  = Key features =
23
 
24
  * **Automatic**: CRP will start displaying related posts on your site and feed automatically after the content when you activate the plugin. No need to edit template files
25
+ * **Manual install**: Want more control over placement? Check the [FAQ](http://wordpress.org/extend/plugins/contextual-related-posts/faq/) on which functions are available for manual install
26
+ * **Gutenberg / Block Editor support**: You can find a block called "Related Posts [CRP]" with its own configurable set of options
27
  * **Widgets**: Add related posts to widgetized area of your theme. Lots of options available
28
  * **Shortcode**: Use `[crp]` to display the posts anywhere you want in the post content
29
  * **The algorithm**: Find related posts by title and/or content of the current post
30
+ * **Caching**: Related posts output is automatically cached as visitors browse through your site
31
  * **Exclusions**: Exclude posts from categories from being displayed in the list. Or you can exclude posts or pages by ID
32
  * **Custom post types**: The related posts list lets you include posts, pages, attachments or any other custom post type!
33
  * **Thumbnail support**:
97
  8. Contextual Related Post metabox in the Edit Posts screen
98
  9. CRP Widget
99
  10. Tools page
100
+ 11. Gutenberg block - Settings sidebar
101
 
102
  == Frequently Asked Questions ==
103
 
166
 
167
  = Shortcodes =
168
 
169
+ You can insert the related posts anywhere in your post using the `[crp]` shortcode. View [this article in the knowledge base](https://webberzone.com/support/knowledgebase/contextual-related-posts-shortcode/) for more details.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
 
172
  == Changelog ==
173
 
174
+ = 2.8.0 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
 
176
+ Release post: [https://webberzone.com/blog/contextual-related-posts-v2-8-0/](https://webberzone.com/blog/contextual-related-posts-v2-8-0/)
177
 
178
  * Features:
179
+ * New block for Gutenberg aka the block editor. The block is called **Related Posts [CRP]** and you can find it under the widgets category
180
+ * Two new settings in the widget: **Order posts** and **Randomize order** that allows the global setting to be overridden
181
+ * New setting called **Keyword** in the Meta box where you can enter a word or a phrase to find related posts. If entered, the plugin will continue to search the `post_title` and `post_content` fields but will use this keyword instead of the values of the title and content of the source post
 
 
 
 
 
 
 
 
 
 
182
 
183
  * Enhancements:
184
+ * Show author, Show date, Show post excerpt and Post thumbnail settings will show a message that they cannnot be modified in case the Rounded thumbnails or No text styles are selected
185
 
186
  * Bug fixes:
187
+ * Selecting date order now orders the related posts by newest first
188
+ * Fixed PHP warning in the widget
189
+ * Stop using `current_time( 'timestamp' )`
190
+ * Fixes incorrect thumbnail image displayed for attachments in the related posts list
191
 
192
  = Earlier versions =
193
 
196
 
197
  == Upgrade Notice ==
198
 
199
+ = 2.8.0 =
200
+ New block for Gutenberg. Enhancements to the widget. New Keyword setting.
201
+ Check the Changelog for more details or view the release post on [https://webberzone.com](https://webberzone.com)