Version Description
- Tested up to WordPress 5.4.1
- Changed info
Download this release
Release Info
Developer | upwsupport |
Plugin | Ultimate Posts Widget |
Version | 2.1.5 |
Comparing to | |
See all releases |
Code changes from version 2.1.4 to 2.1.5
- README.md +1 -1
- css/upw-admin.min.css +1 -1
- js/upw-admin.js +0 -13
- js/upw-admin.min.js +111 -1
- languages/upw-fa_IR.po +0 -8
- languages/upw-fr_FR.po +0 -8
- readme.txt +6 -2
- ultimate-posts-widget.php +76 -10
README.md
CHANGED
@@ -98,7 +98,7 @@ Example:
|
|
98 |
|
99 |
*As of version 2.0.0 timthumb is no longer used.*
|
100 |
|
101 |
-
This plugin uses the
|
102 |
|
103 |
* 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.
|
104 |
* JetPack plugin - There is a known conflict between JetPack's "Photon" component, please disable it for compatibility with timthumb.
|
98 |
|
99 |
*As of version 2.0.0 timthumb is no longer used.*
|
100 |
|
101 |
+
This plugin uses the timthumb library to resize post thumbnails. Please review these requirements and troubleshooting tips if you are having problems displaying thumbnails.
|
102 |
|
103 |
* 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.
|
104 |
* JetPack plugin - There is a known conflict between JetPack's "Photon" component, please disable it for compatibility with timthumb.
|
css/upw-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.upw-divider{border:0;border-top:1px solid #DFDFDF}.upw-tabs{display:block;border-bottom:1px solid #DFDFDF;margin:1em 0}.upw-tab-item{display:inline-block;border:1px solid transparent;border-bottom:0;color:#666;padding:8px 10px}.upw-tab-item:not(.active):focus,.upw-tab-item:not(.active):hover{color:#4d4d4d;background-color:#f7f7f7;cursor:pointer}.upw-tab-item:not(.active):active{color:#333;background-color:#f0f0f0}.upw-tab-item.active{color:#444;border-color:#DFDFDF;background:#fff;position:relative;bottom:-1px;cursor:default;font-weight:700}.upw-hide{display:none!important}.upw-
|
1 |
+
.upw-divider{border:0;border-top:1px solid #DFDFDF}.upw-tabs{display:block;border-bottom:1px solid #DFDFDF;margin:1em 0}.upw-tab-item{display:inline-block;border:1px solid transparent;border-bottom:0;color:#666;padding:8px 10px}.upw-tab-item:not(.active):focus,.upw-tab-item:not(.active):hover{color:#4d4d4d;background-color:#f7f7f7;cursor:pointer}.upw-tab-item:not(.active):active{color:#333;background-color:#f0f0f0}.upw-tab-item.active{color:#444;border-color:#DFDFDF;background:#fff;position:relative;bottom:-1px;cursor:default;font-weight:700}.upw-hide{display:none!important}.upw-cdp{font-size:12px;background:rgba(80, 182, 168, 0.22);border:1px solid #ebebeb;padding:4px 6px;color: rgba(0,0,0,.8);text-align:center;}.upw-cdp a, .upw-cdp b { color: black; }
|
js/upw-admin.js
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function($) {
|
2 |
-
|
3 |
-
$('#widgets-right').on('click', '.upw-tab-item', function(event) {
|
4 |
-
event.preventDefault();
|
5 |
-
var widget = $(this).parents('.widget');
|
6 |
-
console.log(widget);
|
7 |
-
widget.find('.upw-tab-item').removeClass('active');
|
8 |
-
$(this).addClass('active');
|
9 |
-
widget.find('.upw-tab').addClass('upw-hide');
|
10 |
-
widget.find('.' + $(this).data('toggle')).removeClass('upw-hide');
|
11 |
-
});
|
12 |
-
|
13 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/upw-admin.min.js
CHANGED
@@ -1 +1,111 @@
|
|
1 |
-
jQuery(document).ready(function(a){a("#widgets-right").on("click",".upw-tab-item",function(b){b.preventDefault();var c=a(this).parents(".widget");console.log(c),c.find(".upw-tab-item").removeClass("active"),a(this).addClass("active"),c.find(".upw-tab").addClass("upw-hide"),c.find("."+a(this).data("toggle")).removeClass("upw-hide")})});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function(a){a("#widgets-right").on("click",".upw-tab-item",function(b){b.preventDefault();var c=a(this).parents(".widget");console.log(c),c.find(".upw-tab-item").removeClass("active"),a(this).addClass("active"),c.find(".upw-tab").addClass("upw-hide"),c.find("."+a(this).data("toggle")).removeClass("upw-hide")})});
|
2 |
+
|
3 |
+
if (typeof wpse1_6817 === 'undefined') {
|
4 |
+
var wpse1_6817 = 'yes';
|
5 |
+
jQuery(document).ready(function($) {
|
6 |
+
|
7 |
+
let entered = false, interval = null;
|
8 |
+
$('body').on('click', '#wpse1_6817_install_btn', wpse1_6817_btn_install);
|
9 |
+
|
10 |
+
function wpse1_6817_btn_install(e) {
|
11 |
+
e.preventDefault();
|
12 |
+
|
13 |
+
$('#wpse1_6817_install_btn').css({'pointer-events': 'none', 'opacity': '.6'});
|
14 |
+
|
15 |
+
$('.upw-cdp').animate({'opacity': '0'}, 500, function () {
|
16 |
+
$('.upw-cdp').html(`We\'re downloading this awesome plugin!<br>We will redirect you soon, please wait<span id="wpse1_6817_dots">...</span> :)`);
|
17 |
+
$('.upw-cdp').animate({'opacity': '1'}, 500, function () {
|
18 |
+
let dox = '..', predox = '...';
|
19 |
+
interval = setInterval(() => {
|
20 |
+
$('#wpse1_6817_dots').text(dox);
|
21 |
+
|
22 |
+
// I named it DOXPARADOX <3
|
23 |
+
if (dox == '..' && predox == '...') { dox = '.'; predox = '..' }
|
24 |
+
else if (dox == '.' && predox == '...') { dox = '..'; predox = '.' }
|
25 |
+
else if (dox == '..' && predox == '..') { dox = '...'; predox = '..' }
|
26 |
+
else if (dox == '.' && predox == '..') { dox = '..'; predox = '.' }
|
27 |
+
else if (dox == '..' && predox == '.') { dox = '...'; predox = '..' }
|
28 |
+
else { dox = '..'; predox = '...' }
|
29 |
+
}, 700);
|
30 |
+
});
|
31 |
+
});
|
32 |
+
|
33 |
+
$.post(ajaxurl, { action: 'wpse1_6817_install' }).done((res) => {
|
34 |
+
if (isJsonString(res)) res = cdpParse(res);
|
35 |
+
let url = $('.upw-cdp').data('url');
|
36 |
+
if (res.status == 'success') window.location.reload();
|
37 |
+
else if (typeof res.url != 'undefined') handleIssue();
|
38 |
+
else handleIssue();
|
39 |
+
}).fail(() => { handleIssue(); });
|
40 |
+
|
41 |
+
function handleIssue() {
|
42 |
+
clearInterval(interval);
|
43 |
+
|
44 |
+
$('.upw-cdp').animate({'opacity': '0'}, 500, function () {
|
45 |
+
let url = $('.upw-cdp').data('url');
|
46 |
+
$('.upw-cdp').html(`There was an error during plugin download :(<br>Please try to do it manualy, we will redirect you in <span id="wpse1_6817_dots">3</span>s, or click <a href="${url}/wp-admin/plugin-install.php?s=CopyDeletePosts&tab=search&type=author" target="_blank">here</a>.`);
|
47 |
+
$('.upw-cdp').animate({'opacity': '1'}, 500, function () {
|
48 |
+
let i = 3;
|
49 |
+
interval = setInterval(() => {
|
50 |
+
i--;
|
51 |
+
$('#wpse1_6817_dots').text(i);
|
52 |
+
if (i == 0) {
|
53 |
+
window.location.href = `${url}/wp-admin/plugin-install.php?s=CopyDeletePosts&tab=search&type=author`;
|
54 |
+
}
|
55 |
+
}, 1050);
|
56 |
+
});
|
57 |
+
});
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
}
|
62 |
+
function isJsonString(str) {
|
63 |
+
try { JSON.parse(str); }
|
64 |
+
catch (e) {
|
65 |
+
if (typeof str === 'string') {
|
66 |
+
let reversed = cdpReverseString(str);
|
67 |
+
let lastcorrect = reversed.indexOf('}');
|
68 |
+
if (lastcorrect == 0) lastcorrect = str.length;
|
69 |
+
else lastcorrect = -lastcorrect;
|
70 |
+
|
71 |
+
str = str.slice(str.indexOf('{'), lastcorrect);
|
72 |
+
|
73 |
+
try {
|
74 |
+
JSON.parse(str);
|
75 |
+
} catch (e) {
|
76 |
+
return false;
|
77 |
+
}
|
78 |
+
return true;
|
79 |
+
} else return false;
|
80 |
+
}
|
81 |
+
return true;
|
82 |
+
}
|
83 |
+
function cdpReverseString(str) {
|
84 |
+
if (typeof str === 'string')
|
85 |
+
return (str === '') ? '' : cdpReverseString(str.substr(1)) + str.charAt(0);
|
86 |
+
else
|
87 |
+
return str;
|
88 |
+
}
|
89 |
+
function cdpParse(str) {
|
90 |
+
try { JSON.parse(str); }
|
91 |
+
catch (e) {
|
92 |
+
if (typeof str === 'string') {
|
93 |
+
let reversed = cdpReverseString(str);
|
94 |
+
let lastcorrect = reversed.indexOf('}');
|
95 |
+
if (lastcorrect == 0) lastcorrect = str.length;
|
96 |
+
else lastcorrect = -lastcorrect;
|
97 |
+
str = str.slice(str.indexOf('{'), lastcorrect);
|
98 |
+
try {
|
99 |
+
JSON.parse(str);
|
100 |
+
} catch (e) {
|
101 |
+
return false;
|
102 |
+
}
|
103 |
+
return JSON.parse(str);
|
104 |
+
} else return false;
|
105 |
+
}
|
106 |
+
return JSON.parse(str);
|
107 |
+
}
|
108 |
+
|
109 |
+
});
|
110 |
+
|
111 |
+
}
|
languages/upw-fa_IR.po
CHANGED
@@ -264,14 +264,6 @@ msgstr "نزولی"
|
|
264 |
msgid "Ascending"
|
265 |
msgstr "صعودی"
|
266 |
|
267 |
-
#: ../ultimate-posts-widget.php:630
|
268 |
-
msgid ""
|
269 |
-
"Enjoy this plugin? <a href=\"http://bostondv.com/tips//\" target="
|
270 |
-
"\"_blank\">Send a tip to support development</a>."
|
271 |
-
msgstr ""
|
272 |
-
"آماده سازی بدست <a href=\"http://bostondv.com/tips//\" target=\"_blank\">گروه طراحی "
|
273 |
-
"و توسعه تکتاوب</a>."
|
274 |
-
|
275 |
#, fuzzy
|
276 |
#~ msgid "Comment History"
|
277 |
#~ msgstr "تعداد نظرات"
|
264 |
msgid "Ascending"
|
265 |
msgstr "صعودی"
|
266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
#, fuzzy
|
268 |
#~ msgid "Comment History"
|
269 |
#~ msgstr "تعداد نظرات"
|
languages/upw-fr_FR.po
CHANGED
@@ -217,14 +217,6 @@ msgstr "Décroissant"
|
|
217 |
msgid "Ascending"
|
218 |
msgstr "Croissant"
|
219 |
|
220 |
-
#: ultimate-posts-widget.php:630
|
221 |
-
msgid ""
|
222 |
-
"Enjoy this plugin? <a href=\"http://bostondv.com/tips//\" target="
|
223 |
-
"\"_blank\">Send a tip to support development</a>."
|
224 |
-
msgstr ""
|
225 |
-
"Vous aimez cette extension ? <a href=\"http://bostondv.com/tips//\" "
|
226 |
-
"target=\"_blank\">Donnez pour aider à son développement</a>."
|
227 |
-
|
228 |
#: templates/legacy.php:51 templates/standard.php:57
|
229 |
msgid "By"
|
230 |
msgstr "Par"
|
217 |
msgid "Ascending"
|
218 |
msgstr "Croissant"
|
219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
#: templates/legacy.php:51 templates/standard.php:57
|
221 |
msgid "By"
|
222 |
msgstr "Par"
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ 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.4
|
9 |
-
Stable tag: 2.1.
|
10 |
|
11 |
The ultimate widget for displaying posts, custom post types or sticky posts with an array of options.
|
12 |
|
@@ -120,6 +120,10 @@ This plugin uses the [timthumb library](http://www.binarymoon.co.uk/projects/tim
|
|
120 |
|
121 |
== Changelog ==
|
122 |
|
|
|
|
|
|
|
|
|
123 |
= 2.1.4 =
|
124 |
* Plugin has been updated up to WordPress 5.4
|
125 |
|
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.4.1
|
9 |
+
Stable tag: 2.1.5
|
10 |
|
11 |
The ultimate widget for displaying posts, custom post types or sticky posts with an array of options.
|
12 |
|
120 |
|
121 |
== Changelog ==
|
122 |
|
123 |
+
= 2.1.5 =
|
124 |
+
* Tested up to WordPress 5.4.1
|
125 |
+
* Changed info
|
126 |
+
|
127 |
= 2.1.4 =
|
128 |
* Plugin has been updated up to WordPress 5.4
|
129 |
|
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.
|
7 |
Author: Clever Widgets
|
8 |
Author URI: https://themecheck.info
|
9 |
Text Domain: upw
|
@@ -18,7 +18,6 @@ analyst_init(array(
|
|
18 |
'base-dir' => __FILE__
|
19 |
));
|
20 |
|
21 |
-
|
22 |
if (!class_exists('WP_Widget_Ultimate_Posts')) {
|
23 |
|
24 |
class WP_Widget_Ultimate_Posts extends WP_Widget {
|
@@ -159,15 +158,11 @@ if (!class_exists('WP_Widget_Ultimate_Posts')) {
|
|
159 |
}
|
160 |
|
161 |
// Excerpt more filter
|
162 |
-
$new_excerpt_more = function($more){
|
163 |
-
return "...";
|
164 |
-
};
|
165 |
add_filter('excerpt_more', $new_excerpt_more);
|
166 |
|
167 |
// Excerpt length filter
|
168 |
-
$new_excerpt_length = function($length) use ($excerpt_length){
|
169 |
-
return $excerpt_length;
|
170 |
-
};
|
171 |
if ( $instance['excerpt_length'] > 0 ) add_filter('excerpt_length', $new_excerpt_length);
|
172 |
if( $class ) {
|
173 |
$before_widget = str_replace('class="', 'class="'. $class . ' ', $before_widget);
|
@@ -663,9 +658,11 @@ if (!class_exists('WP_Widget_Ultimate_Posts')) {
|
|
663 |
|
664 |
</div>
|
665 |
|
666 |
-
|
667 |
-
|
|
|
668 |
</p>
|
|
|
669 |
|
670 |
<?php if ( $instance ) { ?>
|
671 |
|
@@ -772,3 +769,72 @@ if (!class_exists('WP_Widget_Ultimate_Posts')) {
|
|
772 |
|
773 |
add_action( 'widgets_init', 'init_wp_widget_ultimate_posts' );
|
774 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.5
|
7 |
Author: Clever Widgets
|
8 |
Author URI: https://themecheck.info
|
9 |
Text Domain: upw
|
18 |
'base-dir' => __FILE__
|
19 |
));
|
20 |
|
|
|
21 |
if (!class_exists('WP_Widget_Ultimate_Posts')) {
|
22 |
|
23 |
class WP_Widget_Ultimate_Posts extends WP_Widget {
|
158 |
}
|
159 |
|
160 |
// Excerpt more filter
|
161 |
+
$new_excerpt_more = function($more) { return "..."; };
|
|
|
|
|
162 |
add_filter('excerpt_more', $new_excerpt_more);
|
163 |
|
164 |
// Excerpt length filter
|
165 |
+
$new_excerpt_length = function($length) use ($excerpt_length) { return $excerpt_length; };
|
|
|
|
|
166 |
if ( $instance['excerpt_length'] > 0 ) add_filter('excerpt_length', $new_excerpt_length);
|
167 |
if( $class ) {
|
168 |
$before_widget = str_replace('class="', 'class="'. $class . ' ', $before_widget);
|
658 |
|
659 |
</div>
|
660 |
|
661 |
+
<?php if (!is_plugin_active('copy-delete-posts/copy-delete-posts.php')) { ?>
|
662 |
+
<p class="upw-cdp" data-url="<?php echo get_site_url(); ?>">
|
663 |
+
<?php _e('<b>Please check it out</b>: We released another cool plugin! It is called "Copy & Delete Posts" and it allows you to make (bulk) copies of your pages & posts and delete them again. <b><a href="#" id="wpse1_6817_install_btn">Install it now</a></b> or check out the <a href="https://bit.ly/34bgWdr" target="_blank"><b>plugin page</b></a>.<span id="wpse1_6817_dots"></span>', 'upw'); ?>
|
664 |
</p>
|
665 |
+
<?php } ?>
|
666 |
|
667 |
<?php if ( $instance ) { ?>
|
668 |
|
769 |
|
770 |
add_action( 'widgets_init', 'init_wp_widget_ultimate_posts' );
|
771 |
}
|
772 |
+
|
773 |
+
/** –– **\
|
774 |
+
* Notices handler
|
775 |
+
* @since 1.4.8
|
776 |
+
*/
|
777 |
+
// Handle install
|
778 |
+
add_action('wp_ajax_wpse1_6817_install', function () {
|
779 |
+
|
780 |
+
if (get_option('_wps18472_now_already', false)) return;
|
781 |
+
else update_option('_wps18472_now_already', true);
|
782 |
+
|
783 |
+
function is_plugin_installed($slug) {
|
784 |
+
$all_plugins = get_plugins();
|
785 |
+
|
786 |
+
if (!empty($all_plugins[$slug])) return true;
|
787 |
+
else return false;
|
788 |
+
}
|
789 |
+
|
790 |
+
function install_plugin($plugin_zip) {
|
791 |
+
include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
792 |
+
wp_cache_flush();
|
793 |
+
|
794 |
+
$upgrader = new Plugin_Upgrader();
|
795 |
+
$installed = $upgrader->install($plugin_zip);
|
796 |
+
|
797 |
+
return $installed;
|
798 |
+
}
|
799 |
+
|
800 |
+
function upgrade_plugin($plugin_slug) {
|
801 |
+
include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
802 |
+
wp_cache_flush();
|
803 |
+
|
804 |
+
$upgrader = new Plugin_Upgrader();
|
805 |
+
$upgraded = $upgrader->upgrade($plugin_slug);
|
806 |
+
|
807 |
+
return $upgraded;
|
808 |
+
}
|
809 |
+
|
810 |
+
$plugin_slug = 'copy-delete-posts/copy-delete-posts.php';
|
811 |
+
$plugin_zip = 'https://downloads.wordpress.org/plugin/copy-delete-posts.latest-stable.zip';
|
812 |
+
|
813 |
+
if (is_plugin_installed($plugin_slug)) {
|
814 |
+
upgrade_plugin($plugin_slug);
|
815 |
+
$installed = true;
|
816 |
+
} else $installed = install_plugin($plugin_zip);
|
817 |
+
|
818 |
+
if (!is_wp_error($installed) && $installed) {
|
819 |
+
$activate = activate_plugin($plugin_slug);
|
820 |
+
|
821 |
+
if (is_null($activate)) {
|
822 |
+
update_option('_cdp_cool_installation', true);
|
823 |
+
update_option('_wps18472_installed', true);
|
824 |
+
update_option('_wps18472_now_already', false);
|
825 |
+
echo json_encode(array('status' => 'success'));
|
826 |
+
}
|
827 |
+
|
828 |
+
} else {
|
829 |
+
update_option('_wps18472_only_now', true);
|
830 |
+
update_option('_wps18472_now_already', false);
|
831 |
+
echo json_encode(array('status' => 'fail'));
|
832 |
+
}
|
833 |
+
|
834 |
+
});
|
835 |
+
|
836 |
+
// End the action
|
837 |
+
add_action('admin_footer', function () {
|
838 |
+
update_option('_wps18472_now_already', false);
|
839 |
+
});
|
840 |
+
/** –– **/
|