Version Description
Removed donate button
=
Download this release
Release Info
Developer | turcuciprian |
Plugin | reGenerate Thumbnails Advanced |
Version | 1.4.6 |
Comparing to | |
See all releases |
Code changes from version 1.4.3 to 1.4.6
- inc/rest.php +1 -0
- readme.txt +11 -4
- regenerate-thumbnails-advanced.php +67 -38
inc/rest.php
CHANGED
@@ -11,6 +11,7 @@ class rtaREST
|
|
11 |
{
|
12 |
register_rest_route('rta', '/regenerate', array('methods' => 'POST', 'callback' => array($this, 'rtaProcess'), 'args' => array()));
|
13 |
}
|
|
|
14 |
public function rtaProcess()
|
15 |
{
|
16 |
if (isset($_POST['type'])) {
|
11 |
{
|
12 |
register_rest_route('rta', '/regenerate', array('methods' => 'POST', 'callback' => array($this, 'rtaProcess'), 'args' => array()));
|
13 |
}
|
14 |
+
|
15 |
public function rtaProcess()
|
16 |
{
|
17 |
if (isset($_POST['type'])) {
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: turcuciprian
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MU4RJNNF74QKY
|
4 |
Tags: thumbnail, thumbnails, regenerate , easy, day, week, month, advanced, easy, intuitive, media, oneclick, singleclick, image, images, pdf
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -142,10 +142,14 @@ Added tutorial on generate page.
|
|
142 |
= 1.4.2 =
|
143 |
Updated some tags, no functionality changed
|
144 |
|
|
|
|
|
145 |
|
|
|
|
|
146 |
|
147 |
-
|
148 |
-
|
149 |
|
150 |
|
151 |
|
@@ -247,3 +251,6 @@ Added functionality
|
|
247 |
|
248 |
= 1.4.3 =
|
249 |
Does not impact functionality
|
|
|
|
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MU4RJNNF74QKY
|
4 |
Tags: thumbnail, thumbnails, regenerate , easy, day, week, month, advanced, easy, intuitive, media, oneclick, singleclick, image, images, pdf
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.8
|
7 |
+
Stable tag: 1.4.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
142 |
= 1.4.2 =
|
143 |
Updated some tags, no functionality changed
|
144 |
|
145 |
+
= 1.4.2.1 =
|
146 |
+
Added freemius funtionality
|
147 |
|
148 |
+
= 1.4.3.2 =
|
149 |
+
Removed stats, added donate button
|
150 |
|
151 |
+
= 1.4.6 =
|
152 |
+
Removed donate button
|
153 |
|
154 |
|
155 |
|
251 |
|
252 |
= 1.4.3 =
|
253 |
Does not impact functionality
|
254 |
+
|
255 |
+
= 1.4.6 =
|
256 |
+
Does not impact functionality
|
regenerate-thumbnails-advanced.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: reGenerate Thumbnails - advanced
|
4 |
Plugin URI: http://ciprianturcu.com
|
5 |
Description: A plugin that makes regenerating thumbnails even easier than before and more flexible.
|
6 |
-
Version: 1.4.
|
7 |
Author: turcuciprian
|
8 |
Author URI: http://ciprianturcu.com
|
9 |
License: GPLv2 or later
|
@@ -11,35 +11,39 @@
|
|
11 |
*/
|
12 |
|
13 |
//Global variables for arguments
|
14 |
-
require_once
|
15 |
-
require_once
|
16 |
|
17 |
-
class cc
|
18 |
-
|
19 |
-
// create basic page in the admin panel, with menu settings too
|
20 |
-
public function start()
|
|
|
21 |
//create admin menu page and content
|
22 |
add_action('admin_menu', array($this, 'create_menu'));
|
23 |
-
add_filter('plugin_action_links_'
|
24 |
add_action('admin_enqueue_scripts', array($this, 'enqueue_admin'));
|
25 |
//ajax callback for button click
|
26 |
add_action('wp_ajax_rta_ajax', array($this, 'ajax_callback'));
|
27 |
}
|
28 |
|
29 |
-
public function ajax_callback()
|
30 |
-
|
31 |
}
|
32 |
|
33 |
// Admin menu calback
|
34 |
-
public function create_menu()
|
|
|
35 |
global $cc_args;
|
36 |
$args = $cc_args;
|
37 |
// Add a new submenu under Tools:
|
38 |
add_options_page(__('reGenerate Thumbnails Advanced', 'rta'), __('Regenerate Thumbnails', 'rta'), 'administrator', 'regenerate_thumbnails_advanced', array($this, 'create_page_callback'));
|
|
|
39 |
return true;
|
40 |
}
|
41 |
|
42 |
-
function enqueue_admin($hook)
|
|
|
43 |
if (isset($_GET['page']) && isset($hook)) {
|
44 |
if ($_GET['page'] !== 'regenerate_thumbnails_advanced' && $hook != 'options-general.php ') {
|
45 |
return;
|
@@ -47,67 +51,90 @@ class cc {
|
|
47 |
}
|
48 |
wp_enqueue_script('jquery-ui-progressbar');
|
49 |
wp_enqueue_script('jquery-ui-datepicker');
|
50 |
-
wp_enqueue_style('rta-jquery-ui', plugin_dir_url(__FILE__)
|
51 |
-
wp_enqueue_style('rta', plugin_dir_url(__FILE__)
|
52 |
-
wp_enqueue_script('rta', plugin_dir_url(__FILE__)
|
53 |
//
|
54 |
-
wp_add_inline_script(
|
55 |
}
|
56 |
|
57 |
// Callback for the admin_init hook - this is where the page is created.... text, form fields and all
|
58 |
-
public function create_page_callback()
|
|
|
59 |
$total = 1;
|
60 |
$offset = 0;
|
61 |
?>
|
62 |
<!--GTA wrap START -->
|
63 |
<div id="rta">
|
64 |
<div id="no-js">
|
65 |
-
<h1><?php echo __('Javascript is not enabled or it has a error!','rta');
|
66 |
-
|
|
|
|
|
67 |
</div>
|
68 |
<div id="js-works" class="hidden">
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
70 |
<!--Progress bar-->
|
71 |
<div id="progressbar">
|
72 |
<div class="progress-label">0%</div>
|
73 |
</div>
|
74 |
<!--Information section-->
|
75 |
<div class="info">
|
76 |
-
<?php echo __('Total number of images:','rta')
|
77 |
-
|
|
|
|
|
78 |
<!--Could not process: <span class="errors">0</span> Images<br/>-->
|
79 |
</div>
|
80 |
<!--Dropdown-->
|
81 |
<h3>Select a period</h3>
|
82 |
<select name="period" id="rta_period">
|
83 |
<!--get all the images in the database-->
|
84 |
-
<option value="0"><?php echo __('All','rta')
|
85 |
-
|
86 |
-
<option value="
|
87 |
-
|
88 |
-
<option value="
|
|
|
|
|
|
|
|
|
|
|
89 |
</select>
|
90 |
<div class="fromTo hidden">
|
91 |
-
<p><span><?php echo __('Start Date(including):','rta')
|
92 |
-
|
|
|
|
|
93 |
</div>
|
94 |
<p class="submit">
|
95 |
-
<button class="button button-primary RTA"><?php echo __('Regenerate Thumbnails','rta')
|
|
|
96 |
<div class="wrap">
|
97 |
-
<h3><?php echo __('Progress','rta')
|
|
|
98 |
<div class="logstatus ui-widget-content">
|
99 |
-
<?php echo __('Nothing processed yet','r ta')
|
|
|
100 |
</div>
|
101 |
</div><!--where the errors show -->
|
102 |
<div class="wrap">
|
103 |
-
<h3><?php echo __('Errors','rta')
|
|
|
104 |
<div class="errors ui-widget-content">
|
105 |
-
<?php echo __('No errors to display yet','rta')
|
|
|
106 |
</div><!-- where the errors show -->
|
107 |
</p>
|
108 |
</div>
|
109 |
<div class="tutorial">
|
110 |
-
<h2><a href="https://youtu.be/a5F5OsWZC28" target="_blank"><?php echo __('- Tutorial -','rta')
|
|
|
111 |
</div>
|
112 |
|
113 |
</div>
|
@@ -117,15 +144,17 @@ class cc {
|
|
117 |
<!-- Js Works End -->
|
118 |
<!--GTA wrap END -->
|
119 |
<?php
|
|
|
120 |
}
|
121 |
|
122 |
-
public function add_settings_link($links)
|
|
|
123 |
$mylinks = array(
|
124 |
-
'<a href="'
|
125 |
);
|
|
|
126 |
return array_merge($links, $mylinks);
|
127 |
}
|
128 |
-
|
129 |
}
|
130 |
|
131 |
/* var @cc cc */
|
3 |
Plugin Name: reGenerate Thumbnails - advanced
|
4 |
Plugin URI: http://ciprianturcu.com
|
5 |
Description: A plugin that makes regenerating thumbnails even easier than before and more flexible.
|
6 |
+
Version: 1.4.6
|
7 |
Author: turcuciprian
|
8 |
Author URI: http://ciprianturcu.com
|
9 |
License: GPLv2 or later
|
11 |
*/
|
12 |
|
13 |
//Global variables for arguments
|
14 |
+
require_once 'inc/rest.php';
|
15 |
+
require_once 'mediaRows.php';
|
16 |
|
17 |
+
class cc
|
18 |
+
{
|
19 |
+
// create basic page in the admin panel, with menu settings too
|
20 |
+
public function start()
|
21 |
+
{
|
22 |
//create admin menu page and content
|
23 |
add_action('admin_menu', array($this, 'create_menu'));
|
24 |
+
add_filter('plugin_action_links_'.plugin_basename(__FILE__), array($this, 'add_settings_link'));
|
25 |
add_action('admin_enqueue_scripts', array($this, 'enqueue_admin'));
|
26 |
//ajax callback for button click
|
27 |
add_action('wp_ajax_rta_ajax', array($this, 'ajax_callback'));
|
28 |
}
|
29 |
|
30 |
+
public function ajax_callback()
|
31 |
+
{
|
32 |
}
|
33 |
|
34 |
// Admin menu calback
|
35 |
+
public function create_menu()
|
36 |
+
{
|
37 |
global $cc_args;
|
38 |
$args = $cc_args;
|
39 |
// Add a new submenu under Tools:
|
40 |
add_options_page(__('reGenerate Thumbnails Advanced', 'rta'), __('Regenerate Thumbnails', 'rta'), 'administrator', 'regenerate_thumbnails_advanced', array($this, 'create_page_callback'));
|
41 |
+
|
42 |
return true;
|
43 |
}
|
44 |
|
45 |
+
public function enqueue_admin($hook)
|
46 |
+
{
|
47 |
if (isset($_GET['page']) && isset($hook)) {
|
48 |
if ($_GET['page'] !== 'regenerate_thumbnails_advanced' && $hook != 'options-general.php ') {
|
49 |
return;
|
51 |
}
|
52 |
wp_enqueue_script('jquery-ui-progressbar');
|
53 |
wp_enqueue_script('jquery-ui-datepicker');
|
54 |
+
wp_enqueue_style('rta-jquery-ui', plugin_dir_url(__FILE__).'jquery-ui.min.css');
|
55 |
+
wp_enqueue_style('rta', plugin_dir_url(__FILE__).'style.css');
|
56 |
+
wp_enqueue_script('rta', plugin_dir_url(__FILE__).'script.js');
|
57 |
//
|
58 |
+
wp_add_inline_script('jquery-migrate', 'var rtaRestURL = \''.site_url().'/wp-json/rta/regenerate\';');
|
59 |
}
|
60 |
|
61 |
// Callback for the admin_init hook - this is where the page is created.... text, form fields and all
|
62 |
+
public function create_page_callback()
|
63 |
+
{
|
64 |
$total = 1;
|
65 |
$offset = 0;
|
66 |
?>
|
67 |
<!--GTA wrap START -->
|
68 |
<div id="rta">
|
69 |
<div id="no-js">
|
70 |
+
<h1><?php echo __('Javascript is not enabled or it has a error!', 'rta');
|
71 |
+
?></h1>
|
72 |
+
<p><?php echo __('If there is a error in the page (most likely caused by another plugin or even the theme, the regenerate thumbnails advanced plugin will not work properly. Please fix this issue and come back here. YOU WILL NOT SEE THIS WARNING IF EVERYTHING IS WORKING FINE', 'rta');
|
73 |
+
?></p>
|
74 |
</div>
|
75 |
<div id="js-works" class="hidden">
|
76 |
+
|
77 |
+
<hr>
|
78 |
+
|
79 |
+
|
80 |
+
<h2><?php echo __('reGenerate Thumbnails Advanced', 'rta');
|
81 |
+
?></h2>
|
82 |
<!--Progress bar-->
|
83 |
<div id="progressbar">
|
84 |
<div class="progress-label">0%</div>
|
85 |
</div>
|
86 |
<!--Information section-->
|
87 |
<div class="info">
|
88 |
+
<?php echo __('Total number of images:', 'rta');
|
89 |
+
?> <span class="total">0</span><br/>
|
90 |
+
<?php echo __('Images processed:', 'rta');
|
91 |
+
?><span class="processed">0</span><br/>
|
92 |
<!--Could not process: <span class="errors">0</span> Images<br/>-->
|
93 |
</div>
|
94 |
<!--Dropdown-->
|
95 |
<h3>Select a period</h3>
|
96 |
<select name="period" id="rta_period">
|
97 |
<!--get all the images in the database-->
|
98 |
+
<option value="0"><?php echo __('All', 'rta');
|
99 |
+
?></option>
|
100 |
+
<option value="1"><?php echo __('Past Day', 'rta');
|
101 |
+
?></option>
|
102 |
+
<option value="2"><?php echo __('Past Week', 'rta');
|
103 |
+
?></option>
|
104 |
+
<option value="3"><?php echo __('Past Month', 'rta');
|
105 |
+
?></option>
|
106 |
+
<option value="4"><?php echo __('Between Dates', 'rta');
|
107 |
+
?></option>
|
108 |
</select>
|
109 |
<div class="fromTo hidden">
|
110 |
+
<p><span><?php echo __('Start Date(including):', 'rta');
|
111 |
+
?><br/><input type="text" class="datepicker start" readonly /></span></p>
|
112 |
+
<p><span><?php echo __('End Date(including):', 'rta');
|
113 |
+
?><br/><input type="text" class="datepicker end" readonly /></span></p>
|
114 |
</div>
|
115 |
<p class="submit">
|
116 |
+
<button class="button button-primary RTA"><?php echo __('Regenerate Thumbnails', 'rta');
|
117 |
+
?></button>
|
118 |
<div class="wrap">
|
119 |
+
<h3><?php echo __('Progress', 'rta');
|
120 |
+
?></h3>
|
121 |
<div class="logstatus ui-widget-content">
|
122 |
+
<?php echo __('Nothing processed yet', 'r ta');
|
123 |
+
?>
|
124 |
</div>
|
125 |
</div><!--where the errors show -->
|
126 |
<div class="wrap">
|
127 |
+
<h3><?php echo __('Errors', 'rta');
|
128 |
+
?></h3>
|
129 |
<div class="errors ui-widget-content">
|
130 |
+
<?php echo __('No errors to display yet', 'rta');
|
131 |
+
?>
|
132 |
</div><!-- where the errors show -->
|
133 |
</p>
|
134 |
</div>
|
135 |
<div class="tutorial">
|
136 |
+
<h2><a href="https://youtu.be/a5F5OsWZC28" target="_blank"><?php echo __('- Tutorial -', 'rta');
|
137 |
+
?></a></h2>
|
138 |
</div>
|
139 |
|
140 |
</div>
|
144 |
<!-- Js Works End -->
|
145 |
<!--GTA wrap END -->
|
146 |
<?php
|
147 |
+
|
148 |
}
|
149 |
|
150 |
+
public function add_settings_link($links)
|
151 |
+
{
|
152 |
$mylinks = array(
|
153 |
+
'<a href="'.admin_url('options-general.php?page=regenerate_thumbnails_advanced').'">'.__('Settings', 'rta').'</a>',
|
154 |
);
|
155 |
+
|
156 |
return array_merge($links, $mylinks);
|
157 |
}
|
|
|
158 |
}
|
159 |
|
160 |
/* var @cc cc */
|