Ultimate Posts Widget - Version 2.1.1

Version Description

  • Added possibility to exclude current post from the list
  • Tested update WordPress 5.3.3 (beta)+
Download this release

Release Info

Developer upwsupport
Plugin Icon wp plugin Ultimate Posts Widget
Version 2.1.1
Comparing to
See all releases

Code changes from version 2.1.0 to 2.1.1

.gitignore CHANGED
@@ -2,4 +2,3 @@
2
  node_modules
3
  .sass-cache
4
  *.tmp
5
- package-lock.json
2
  node_modules
3
  .sass-cache
4
  *.tmp
 
LICENSE.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ Copyright (c) Boston Dell-Vandenberg
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
README.md ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultimate Posts Widget
2
+
3
+ The ultimate widget for displaying posts, custom post types or sticky posts with an array of options to customize the display.
4
+
5
+ Designed for both the average user and developer, Ultimate Posts Widgets aims to provide flexibility and ease of use for displaying any kinds of posts within your widget areas. An array of widget options are available as well as hooks, filters and custom templates for more advanced customization.
6
+
7
+ ## Options
8
+
9
+ * Filter by categories
10
+ * Filter by current category
11
+ * Filter by tags
12
+ * Filter by current tag
13
+ * Filter by custom post types
14
+ * Filter by sticky posts
15
+ * Select number of posts to display
16
+ * Display title
17
+ * Display publish date/time with custom format options
18
+ * Display post author and link
19
+ * Display post comment count
20
+ * Display excerpt or full content
21
+ * Display read more link with custom label
22
+ * Display featured image and at any size
23
+ * Display post categories
24
+ * Display post tags
25
+ * Display custom fields
26
+ * Add text or HTML before and after posts list
27
+ * Add CSS class to widget
28
+ * Add widget title link
29
+ * Change excerpt length (in words)
30
+ * Order by date, title, number of comments, random or a custom field
31
+
32
+ ## More Information
33
+
34
+ * For help use [wordpress.org](http://wordpress.org/support/plugin/ultimate-posts-widget/)
35
+ * Fork or contribute on [Github](https://github.com/bostondv/ultimate-posts-widget/)
36
+ * Follow me on [Twitter](http://twitter.com/bostondv/)
37
+ * View my other [WordPress Plugins](http://profiles.wordpress.org/bostondv/)
38
+
39
+ ## Support
40
+
41
+ Enjoy this plugin? [Send a tip to support development](http://bostondv.com/tips/).
42
+
43
+ ## Frequently Asked Questions
44
+
45
+ #### Filters
46
+
47
+ **upw_enqueue_styles** *(boolean)*
48
+ Allows changing whether to load the template CSS file(s).
49
+
50
+ **upw_wp_query_args** *(array)*
51
+ Allows changing the WP_Query arguments for the widget.
52
+
53
+ **upw_custom_template_path** *(string)*
54
+ Allows changing the default custom template path.
55
+
56
+ #### Templates
57
+
58
+ **legacy**
59
+ As of version 2.0.0 we changed the widget HTML markup. For installs prior to 2.0.0 you can use the legacy template to retain the old HTML markup and compatibility.
60
+
61
+ **standard**
62
+ The new standard template as of version 2.0.0. It features better HTML5 markup, improved styling on various themes without the need for custom CSS, and hfeed microformat.
63
+
64
+ **custom**
65
+ As of version 2.0.0 you can now provide your own custom template files. To do this, create a directory named `upw` in your theme and copy a template from the plugin's `templates` directory. Edit as needed.
66
+
67
+ Then, in the widget settings under the *Display* tab, choose *Custom* from the *Template* drop down. In the *Custom Template Name* field that appears and enter the file name of your template (excluding .php). For example, if your template is named `custom.php` then enter `custom` in the *Custom Template Name* field.
68
+
69
+ #### Images sizes
70
+
71
+ *As of version 2.0.0, the plugin no longer supports setting custom image sizes from the widget options panel.*
72
+
73
+ To change image sizes you can either edit the built-in sizes (thumbnail, medium, and large) or define a custom image size in your theme `functions.php`.
74
+
75
+ **Edit built-in image sizes:** Go to *Settings > Media* and change the image sizes as desired. Once image sizes are changed you will need to regenerate thumbnails to update any existing images. This can be done with [AJAX Thumbnail Rebuild](https://wordpress.org/plugins/ajax-thumbnail-rebuild/) or [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) plugins. Note that this will affect image sizes for the entire site.
76
+
77
+ **Define a custom image size:** Edit your `functions.php` file and add a new image size with the `add_image_size` function. See the [WordPress codex for documentation](http://codex.wordpress.org/Function_Reference/add_image_size). Once the function is added, your custom size will be available to select from the widget options. Like editing a built-in size, you will need to regenerate thumbnails for existing images.
78
+
79
+ Example:
80
+
81
+ `<?php add_image_size( 'my-custom-size', 800, 600, false ); ?>`
82
+
83
+ #### Thumbnail images are not displaying
84
+
85
+ *As of version 2.0.0 timthumb is no longer used.*
86
+
87
+ This plugin uses the [timthumb library](http://www.binarymoon.co.uk/projects/timthumb/) to resize post thumbnails. Please review these requirements and troubleshooting tips if you are having problems displaying thumbnails.
88
+
89
+ * Right click > view image - If an image isn't loading then this is the first thing you should do. 9 times out of 10 it will tell you what the problem is in an easy to read error message.
90
+ * JetPack plugin - There is a known conflict between JetPack's "Photon" component, please disable it for compatibility with timthumb.
91
+ * Server requirements - PHP and the GD image library must be installed on your web server. Normally most web servers include them by default.
92
+ * Cache permissions - The cache directory `wp-content/plugins/ultimate-posts-widget/cache` should be set to 777 or if that doesn't work, you may find 755 is ok.
93
+ * Image sizes - timthumb is configured to only work for images smaller than 1500 x 1500. The plugin and automatically selects the "Large" size from Settings > Media, if it is greater than 1500 x 1500 you will need to reduce the size or modify the configuration in `thumb.php` to support larger image sizes.
94
+ * Tilde(~) in url - timthumb has a known issue with this, please use a url without a tilde until a fix is available. [Bug report](https://code.google.com/p/timthumb/issues/detail?id=263)
95
+ * Thumbnail images only work with WordPress' native post thumbnail / featured image. Many theme use a custom image field for thumbnails, these are not supported.
96
+
97
+ **Still stuck?** See [additional troubleshooting tips](http://www.binarymoon.co.uk/2010/11/timthumb-hints-tips/) from the timthumb author.
98
+
99
+ ## Screenshots
100
+
101
+ 1. Example with TwentyTwelve theme with the default widget options
102
+ 2. General options tab
103
+ 3. Display options tab
104
+ 4. Filter options tab
105
+ 5. Order options tab
106
+
107
+ ## Changelog
108
+
109
+ ### 2.0.7
110
+ * Tested update WordPress 4.8
111
+
112
+ ### 2.0.6
113
+ * Fix PHP notice (thanks @rhyswynne)
114
+ * Search custom template both in child theme and in parent (thanks @groucho75)
115
+
116
+ ### 2.0.5
117
+ * Adds menu order sort by option
118
+
119
+ ### 2.0.4
120
+ * Updated class constructor for WordPress 4.3 compatibility (thanks @JustB)
121
+
122
+ ### 2.0.3
123
+ * Adds link to thumbnail images
124
+ * Adds option to show all categories, tags, or types for better usability
125
+ * Improve spacing and font sizes on some themes for the standard template
126
+ * Document adding custom image sizes
127
+ * Add option to display full size post thumbnail
128
+ * Remove post_class() from legacy template for better backwards compatibility
129
+
130
+ ### 2.0.2
131
+ * Reverts back to using `widget_title` filter
132
+ * Fixes number of posts setting to allow unlimited amounts
133
+ * Adds instance and widget ID variables to filters for more control
134
+
135
+ ### 2.0.1
136
+ * Fixes issue loading multiple widgets on the same page and using the same template
137
+ * Adds a default title to the widget for new instances
138
+ * Documentation improvements
139
+
140
+ ### 2.0.0
141
+
142
+ * Added a new standard template and custom template support
143
+ * Added basic CSS styles for better formatting
144
+ * Add hfeed microformat into new standard template
145
+ * Improved widget options interface
146
+ * Add option to filter by tags or current tag
147
+ * Remove timthumb in favor of using built-in WordPress image sizes
148
+ * Remove widget "More Button" options
149
+ * Change date display options to now accept any custom date formats
150
+ * Add before and after posts HTML fields
151
+ * Add option for widget CSS class (thanks @avenirer)
152
+ * Add option to display comment count
153
+ * Set better defaults for newly created widgets
154
+ * Various bug fixes and optimizations
155
+
156
+ *Upgrading from an earlier version?*
157
+
158
+ * Upgrades from prior to 2.0.0 we retain the "legacy" template for you. To change which template to use, find the "Template" option under the "Display" tab.
159
+ * If you used the "More Button", you will need to add in your own HTML into one of the new fields since the more button is now removed.
160
+ * If you used custom thumbnail settings you will need to update them. You can now choose from pre-defined sizes available to WordPress. If you need an additional image size please see [how to add image sizes](http://codex.wordpress.org/Function_Reference/add_image_size).
161
+ * Date formatting has changed, you will need to update your settings. By default it uses WordPress' date/time options.
162
+
163
+ ### 1.9.0
164
+
165
+ * Adds option to order by custom field (thanks @enekochan)
166
+ * Remove "Permalink to:" from link titles (thanks @wirelessgizmo)
167
+ * Swedish translation (thanks @brstp)
168
+
169
+ ### 1.8.1
170
+
171
+ * Add content display option
172
+
173
+ ### 1.8
174
+
175
+ * Add custom field display
176
+ * Re-organized widget options
177
+ * Use proper alt tag for image thumbnails
178
+ * Better title attribute for links
179
+
180
+ ### 1.7
181
+
182
+ * Added show author option
183
+ * Added class to highlight current post
184
+ * Fixed PHP error notices
185
+
186
+ ### 1.6
187
+
188
+ * Added localization support
189
+ * Added show post categories option
190
+ * Added show post tags option
191
+ * Added custom widget title URL option
192
+ * Improved filter controls for sticky posts
193
+ * Bug fixes
194
+
195
+ ###1.5.1
196
+
197
+ * Upgrade timthumb to 2.8.11
198
+ * Load "Large" size post thumbnails which should eliminate large image errors
199
+ * Improved FAQ for thumbnail troubleshooting
200
+
201
+ ### 1.5
202
+
203
+ * Adds crop mode option
204
+ * Add show published time option
205
+ * Now uses date / time format settings
206
+ * Bug fixes
207
+
208
+ ### 1.4.5
209
+
210
+ * Updates screenshot
211
+
212
+ ### 1.4.4
213
+
214
+ * Fixes show_readmore function
215
+ * Adds more button link option
216
+
217
+ ### 1.4
218
+
219
+ * Cleaner widget options
220
+ * Code refactoring and fixes
221
+ * Adds order by option
222
+
223
+ ### 1.3
224
+
225
+ * Sticky posts only now optional
226
+
227
+ ### 1.2
228
+
229
+ * Added post type filter option.
230
+ * Code cleanup.
231
+ * Better selection mechanism for categories.
232
+
233
+ ### 1.1
234
+
235
+ * Added category filter option.
236
+
237
+ ### 1.0
238
+
239
+ * First release.
240
+
241
+ ## Upgrade Notice
242
+
243
+ ### 2.0.0
244
+
245
+ This is a major update and includes some breaking changes. New templates have been introduced, a few fields have changed, and thumbnails have been modified. See the changelog for details.
246
+
247
+ ## Installation
248
+
249
+ 1. Download and extract the zip archive
250
+ 2. Upload `ultimate-posts-widget` folder to `/wp-content/plugins/`
251
+ 3. Activate the plugin through the 'Plugins' menu in WordPress
252
+ 4. Add the widget to a sidebar and configure the options as desired
253
+
254
+ ## About
255
+
256
+ Made with <3 by [Boston Dell-Vandenberg](http://bostondv.com).
css/upw-admin.min.css CHANGED
File without changes
css/upw-theme-standard.min.css CHANGED
File without changes
js/upw-admin.min.js CHANGED
File without changes
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === Ultimate Posts Widget ===
2
- Contributors: cl272, upwsupport
3
  Donate link: https://sellcodes.com/5U4SICyc
4
  License: MIT
5
  License URI: http://opensource.org/licenses/MIT
6
  Tags: widget, recent posts, custom post types, sticky posts, featured image, post thumbnail, excerpts, category, custom fields, list pages, widget query, microformats, customizable widget, categories widget, tags widget, excerpt, widget templates, post author, post date, custom query, ultimate posts, comments, orderby, comment count
7
  Requires at least: 3.5
8
  Tested up to: 5.3
9
- Stable tag: 2.1.0
10
 
11
  The ultimate widget for displaying posts, custom post types or sticky posts with an array of options.
12
 
@@ -42,6 +42,7 @@ Designed for both the average user and developer, Ultimate Posts Widgets aims to
42
  * Add widget title link
43
  * Change excerpt length (in words)
44
  * Order by date, title, number of comments, random or a custom field
 
45
 
46
  = Documentation =
47
 
@@ -119,6 +120,10 @@ This plugin uses the [timthumb library](http://www.binarymoon.co.uk/projects/tim
119
 
120
  == Changelog ==
121
 
 
 
 
 
122
  = 2.1.0 =
123
  * Added possibility for changing custom message when no posts.
124
  * Increased stability of the plugin
@@ -267,9 +272,9 @@ This plugin uses the [timthumb library](http://www.binarymoon.co.uk/projects/tim
267
 
268
  == Upgrade Notice ==
269
 
270
- = 2.1.0 =
271
 
272
- Please update
273
 
274
  == Installation ==
275
 
1
  === Ultimate Posts Widget ===
2
+ Contributors: cl272
3
  Donate link: https://sellcodes.com/5U4SICyc
4
  License: MIT
5
  License URI: http://opensource.org/licenses/MIT
6
  Tags: widget, recent posts, custom post types, sticky posts, featured image, post thumbnail, excerpts, category, custom fields, list pages, widget query, microformats, customizable widget, categories widget, tags widget, excerpt, widget templates, post author, post date, custom query, ultimate posts, comments, orderby, comment count
7
  Requires at least: 3.5
8
  Tested up to: 5.3
9
+ Stable tag: 2.1.1
10
 
11
  The ultimate widget for displaying posts, custom post types or sticky posts with an array of options.
12
 
42
  * Add widget title link
43
  * Change excerpt length (in words)
44
  * Order by date, title, number of comments, random or a custom field
45
+ * Exclude current post from the list
46
 
47
  = Documentation =
48
 
120
 
121
  == Changelog ==
122
 
123
+ = 2.1.1 =
124
+ * Added possibility to exclude current post from the list
125
+ * Tested update WordPress 5.3.3 (beta)+
126
+
127
  = 2.1.0 =
128
  * Added possibility for changing custom message when no posts.
129
  * Increased stability of the plugin
272
 
273
  == Upgrade Notice ==
274
 
275
+ = 2.0.0 =
276
 
277
+ This is a major update and includes some breaking changes. New templates have been introduced, a few fields have changed, and thumbnails have been modified. See the changelog for details.
278
 
279
  == Installation ==
280
 
ultimate-posts-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Ultimate Posts Widget
4
  Plugin URI: http://wordpress.org/plugins/ultimate-posts-widget/
5
  Description: The ultimate widget for displaying posts, custom post types or sticky posts with an array of options.
6
- Version: 2.1.0
7
  Author: Clever Widgets
8
  Author URI: https://themecheck.info
9
  Text Domain: upw
@@ -102,6 +102,7 @@ if ( !class_exists( 'WP_Widget_Ultimate_Posts' ) ) {
102
  $atcat = $instance['atcat'] ? true : false;
103
  $thumb_size = $instance['thumb_size'];
104
  $attag = $instance['attag'] ? true : false;
 
105
  $excerpt_length = $instance['excerpt_length'];
106
  $excerpt_readmore = $instance['excerpt_readmore'];
107
  $sticky = $instance['sticky'];
@@ -192,6 +193,10 @@ if ( !class_exists( 'WP_Widget_Ultimate_Posts' ) ) {
192
  'post_status' => array('publish', 'inherit')
193
  );
194
 
 
 
 
 
195
  if ($orderby === 'meta_value') {
196
  $args['meta_key'] = $meta_key;
197
  }
@@ -201,7 +206,6 @@ if ( !class_exists( 'WP_Widget_Ultimate_Posts' ) ) {
201
  }
202
 
203
  $args = apply_filters('upw_wp_query_args', $args, $instance, $this->id_base);
204
-
205
  $upw_query = new WP_Query($args);
206
 
207
  if ($instance['template'] === 'custom') {
@@ -246,6 +250,7 @@ if ( !class_exists( 'WP_Widget_Ultimate_Posts' ) ) {
246
  $instance['atcat'] = isset( $new_instance['atcat'] );
247
  $instance['attag'] = isset( $new_instance['attag'] );
248
  $instance['show_excerpt'] = isset( $new_instance['show_excerpt'] );
 
249
  $instance['show_content'] = isset( $new_instance['show_content'] );
250
  $instance['show_thumbnail'] = isset( $new_instance['show_thumbnail'] );
251
  $instance['show_date'] = isset( $new_instance['show_date'] );
@@ -320,6 +325,7 @@ if ( !class_exists( 'WP_Widget_Ultimate_Posts' ) ) {
320
  'show_author' => true,
321
  'show_comments' => false,
322
  'show_excerpt' => true,
 
323
  'show_content' => false,
324
  'show_readmore' => true,
325
  'show_thumbnail' => true,
@@ -357,6 +363,7 @@ if ( !class_exists( 'WP_Widget_Ultimate_Posts' ) ) {
357
  $show_author = $instance['show_author'];
358
  $show_comments = $instance['show_comments'];
359
  $show_excerpt = $instance['show_excerpt'];
 
360
  $show_content = $instance['show_content'];
361
  $show_readmore = $instance['show_readmore'];
362
  $show_thumbnail = $instance['show_thumbnail'];
@@ -497,6 +504,11 @@ if ( !class_exists( 'WP_Widget_Ultimate_Posts' ) ) {
497
  <label for="<?php echo $this->get_field_id( 'show_comments' ); ?>"><?php _e( 'Show comments count', 'upw' ); ?></label>
498
  </p>
499
 
 
 
 
 
 
500
  <p>
501
  <input class="checkbox" id="<?php echo $this->get_field_id( 'show_excerpt' ); ?>" name="<?php echo $this->get_field_name( 'show_excerpt' ); ?>" type="checkbox" <?php checked( (bool) $show_excerpt, true ); ?> />
502
  <label for="<?php echo $this->get_field_id( 'show_excerpt' ); ?>"><?php _e( 'Show excerpt', 'upw' ); ?></label>
@@ -662,6 +674,7 @@ if ( !class_exists( 'WP_Widget_Ultimate_Posts' ) ) {
662
  jQuery(document).ready(function($){
663
 
664
  var show_excerpt = $("#<?php echo $this->get_field_id( 'show_excerpt' ); ?>");
 
665
  var show_content = $("#<?php echo $this->get_field_id( 'show_content' ); ?>");
666
  var show_readmore = $("#<?php echo $this->get_field_id( 'show_readmore' ); ?>");
667
  var show_readmore_wrap = $("#<?php echo $this->get_field_id( 'show_readmore' ); ?>").parents('p');
3
  Plugin Name: Ultimate Posts Widget
4
  Plugin URI: http://wordpress.org/plugins/ultimate-posts-widget/
5
  Description: The ultimate widget for displaying posts, custom post types or sticky posts with an array of options.
6
+ Version: 2.1.1
7
  Author: Clever Widgets
8
  Author URI: https://themecheck.info
9
  Text Domain: upw
102
  $atcat = $instance['atcat'] ? true : false;
103
  $thumb_size = $instance['thumb_size'];
104
  $attag = $instance['attag'] ? true : false;
105
+ $exclude_current = $instance['exclude_current'] ? true : false;
106
  $excerpt_length = $instance['excerpt_length'];
107
  $excerpt_readmore = $instance['excerpt_readmore'];
108
  $sticky = $instance['sticky'];
193
  'post_status' => array('publish', 'inherit')
194
  );
195
 
196
+ if ($exclude_current) {
197
+ $args['post__not_in'] = array($post->ID);
198
+ }
199
+
200
  if ($orderby === 'meta_value') {
201
  $args['meta_key'] = $meta_key;
202
  }
206
  }
207
 
208
  $args = apply_filters('upw_wp_query_args', $args, $instance, $this->id_base);
 
209
  $upw_query = new WP_Query($args);
210
 
211
  if ($instance['template'] === 'custom') {
250
  $instance['atcat'] = isset( $new_instance['atcat'] );
251
  $instance['attag'] = isset( $new_instance['attag'] );
252
  $instance['show_excerpt'] = isset( $new_instance['show_excerpt'] );
253
+ $instance['exclude_current'] = isset( $new_instance['exclude_current'] );
254
  $instance['show_content'] = isset( $new_instance['show_content'] );
255
  $instance['show_thumbnail'] = isset( $new_instance['show_thumbnail'] );
256
  $instance['show_date'] = isset( $new_instance['show_date'] );
325
  'show_author' => true,
326
  'show_comments' => false,
327
  'show_excerpt' => true,
328
+ 'exclude_current' => false,
329
  'show_content' => false,
330
  'show_readmore' => true,
331
  'show_thumbnail' => true,
363
  $show_author = $instance['show_author'];
364
  $show_comments = $instance['show_comments'];
365
  $show_excerpt = $instance['show_excerpt'];
366
+ $exclude_current = $instance['exclude_current'];
367
  $show_content = $instance['show_content'];
368
  $show_readmore = $instance['show_readmore'];
369
  $show_thumbnail = $instance['show_thumbnail'];
504
  <label for="<?php echo $this->get_field_id( 'show_comments' ); ?>"><?php _e( 'Show comments count', 'upw' ); ?></label>
505
  </p>
506
 
507
+ <p>
508
+ <input class="checkbox" id="<?php echo $this->get_field_id( 'exclude_current' ); ?>" name="<?php echo $this->get_field_name( 'exclude_current' ); ?>" type="checkbox" <?php checked( (bool) $exclude_current, true ); ?> />
509
+ <label for="<?php echo $this->get_field_id( 'exclude_current' ); ?>"><?php _e( 'Exclude current post from the list', 'upw' ); ?></label>
510
+ </p>
511
+
512
  <p>
513
  <input class="checkbox" id="<?php echo $this->get_field_id( 'show_excerpt' ); ?>" name="<?php echo $this->get_field_name( 'show_excerpt' ); ?>" type="checkbox" <?php checked( (bool) $show_excerpt, true ); ?> />
514
  <label for="<?php echo $this->get_field_id( 'show_excerpt' ); ?>"><?php _e( 'Show excerpt', 'upw' ); ?></label>
674
  jQuery(document).ready(function($){
675
 
676
  var show_excerpt = $("#<?php echo $this->get_field_id( 'show_excerpt' ); ?>");
677
+ var exclude_current = $("#<?php echo $this->get_field_id( 'exclude_current' ); ?>");
678
  var show_content = $("#<?php echo $this->get_field_id( 'show_content' ); ?>");
679
  var show_readmore = $("#<?php echo $this->get_field_id( 'show_readmore' ); ?>");
680
  var show_readmore_wrap = $("#<?php echo $this->get_field_id( 'show_readmore' ); ?>").parents('p');