Version Description
Download this release
Release Info
Developer | turcuciprian |
Plugin | reGenerate Thumbnails Advanced |
Version | 1.1.6 |
Comparing to | |
See all releases |
Code changes from version 1.1.5 to 1.1.6
- abExport.php +56 -60
- readme.txt +6 -1
- regenerate-thumbnails-advanced.php +3 -3
abExport.php
CHANGED
@@ -1,66 +1,62 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
4 |
$abError = false;
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
echo $pluginActive;
|
13 |
-
// exit;
|
14 |
-
|
15 |
-
if (isset($_GET['action']) && $_GET['action'] === 'install-plugin' && isset($_GET['plugin']) && $_GET['plugin'] === 'admin-builder') {
|
16 |
-
return;
|
17 |
-
}
|
18 |
-
|
19 |
-
if (!function_exists('get_plugins')) {
|
20 |
-
require_once ABSPATH.'wp-admin/includes/plugin.php';
|
21 |
-
}
|
22 |
-
$allPlugins = get_plugins();
|
23 |
-
foreach ($allPlugins as $key => $value) {
|
24 |
-
if ($key === 'admin-builder/admin_builder.php') {
|
25 |
-
$pluginInstalled = true;
|
26 |
-
}
|
27 |
-
# code...
|
28 |
-
}
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
echo 'To get the full functionality , activate Admin Builder from the <a href="'.$url.'/plugins.php"><span class="button-primary">plugins directory</span></a>.';
|
51 |
-
echo '</p>';
|
52 |
-
echo '</div>';
|
53 |
-
}
|
54 |
-
}
|
55 |
-
}
|
56 |
add_action('admin_notices', 'ab_admin_notices');
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
global $abNoticesCalled;
|
4 |
+
$abNoticesCalled = (isset($abNoticesCalled)?$abNoticesCalled:true);
|
5 |
$abError = false;
|
6 |
+
include_once ABSPATH.'wp-admin/includes/plugin.php';
|
7 |
+
if (!function_exists('ab_admin_notices')) {
|
8 |
+
function ab_admin_notices()
|
9 |
+
{
|
10 |
+
$pluginInstalled = false;
|
11 |
+
include_once ABSPATH.'wp-admin/includes/plugin.php';
|
12 |
+
$pluginActive = is_plugin_active('admin-builder/admin_builder.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
+
if(isset($_GET['action']) && $_GET['action']==='install-plugin' && isset($_GET['plugin']) && $_GET['plugin']==='admin-builder'){return;}
|
15 |
+
if (!function_exists('get_plugins')) {
|
16 |
+
require_once ABSPATH.'wp-admin/includes/plugin.php';
|
17 |
+
}
|
18 |
+
$allPlugins = get_plugins();
|
19 |
+
foreach ($allPlugins as $key => $value) {
|
20 |
+
if ($key === 'admin-builder/admin_builder.php') {
|
21 |
+
$pluginInstalled = true;
|
22 |
+
}
|
23 |
+
# code...
|
24 |
+
}
|
25 |
+
if (!$pluginInstalled) {
|
26 |
+
echo '<div class="notice notice-error is-dismissible">';
|
27 |
+
echo '<h3>Step 2: Install Admin Builder</h3>';
|
28 |
+
echo '<p>';
|
29 |
+
echo 'To get the full functionality , install Admin Builder.';
|
30 |
+
echo '</p>';
|
31 |
+
echo '<p>';
|
32 |
+
$plugin_name = 'admin-builder';
|
33 |
+
echo '</p>';
|
34 |
+
echo '</div>';
|
35 |
+
} else {
|
36 |
+
if (!$pluginActive) {
|
37 |
+
$url = admin_url();
|
38 |
|
39 |
+
echo '<div class="notice notice-error is-dismissible">';
|
40 |
+
echo '<h3>Step 3(final): Activate Admin Builder!</h3>';
|
41 |
+
echo '<p>';
|
42 |
+
echo 'To get the full functionality , activate Admin Builder from the <a href="'.$url.'/plugins.php"><span class="button-primary">plugins directory</span></a>.';
|
43 |
+
echo '</p>';
|
44 |
+
echo '</div>';
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
if(!$abNoticesCalled){
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
add_action('admin_notices', 'ab_admin_notices');
|
50 |
+
$abNoticesCalled = true;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
if (!$abError) {
|
54 |
+
if (!$abError) {
|
55 |
+
if (class_exists('loadFromPlugin')) {
|
56 |
+
|
57 |
+
$theJson = '{"menus":[{"label":"Posts","type":"post","name":"posts","unique":true,"children":[],"$$hashKey":"object:66"},{"label":"Pages","type":"page","name":"pages","unique":true,"children":[],"$$hashKey":"object:67"},{"label":"Reg. Thumbnails","type":"cPage","name":"regenerateThumbnailsAdvanced","unique":false,"children":[{"label":"General Settings","name":"tab1","context":"normal","priority":"default","fields":[{"name":"rtaOTF","type":"checkbox","label":"Auto Regenerate","description":"Check this if you want missing thumbnails to be created on the fly, when needed.","extraText":"Activate","$$hashKey":"object:293"}],"$$hashKey":"object:92"}],"capability":"manage_options","handler":"ab_regenerateThumbnailsAdvanced","pageTitle":"regenerate Thumbnails Settings","$$hashKey":"object:89","pageDescription":"Configure if you want to regenerate thumbnails on the fly or not. Just make sure to check the checkbox if you do want everything to be taken care of regarding unexisting plugins."}]}';
|
58 |
+
$lfp = new loadFromPlugin();
|
59 |
+
$lfp->load($theJson);
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: regenerate, thumbnails, advanced, easy, day, weeek, month
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 4.4.1
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -118,6 +118,8 @@ Extra bugfixes
|
|
118 |
=1.1.5=
|
119 |
admin-builder.php turned to admin_builder.php on admin builder verification check
|
120 |
|
|
|
|
|
121 |
|
122 |
== Upgrade Notice ==
|
123 |
|
@@ -177,3 +179,6 @@ Extra bugfixes
|
|
177 |
|
178 |
=1.1.5=
|
179 |
nothing effected in db
|
|
|
|
|
|
4 |
Tags: regenerate, thumbnails, advanced, easy, day, weeek, month
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 4.4.1
|
7 |
+
Stable tag: 1.1.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
118 |
=1.1.5=
|
119 |
admin-builder.php turned to admin_builder.php on admin builder verification check
|
120 |
|
121 |
+
=1.1.6=
|
122 |
+
Admin builder export functionality update
|
123 |
|
124 |
== Upgrade Notice ==
|
125 |
|
179 |
|
180 |
=1.1.5=
|
181 |
nothing effected in db
|
182 |
+
|
183 |
+
=1.1.6=
|
184 |
+
nothing effected in db
|
regenerate-thumbnails-advanced.php
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
Plugin Name: reGenerate Thumbnails - advanced
|
4 |
Plugin URI: http://turcuciprian.com
|
5 |
Description: A plugin that makes regenerating thumbnails even easier than before and more flexible.
|
6 |
-
Version: 1.1.
|
7 |
Author: turcuciprian
|
8 |
-
Author URI: http://
|
9 |
License: GPLv2 or later
|
10 |
Text Domain: RTA
|
11 |
*/
|
@@ -28,7 +28,7 @@ add_action('init', 'rtaInit');
|
|
28 |
function rtaInit()
|
29 |
{
|
30 |
global $abGen;
|
31 |
-
if (!
|
32 |
return true;
|
33 |
}
|
34 |
$rotf = $abGen->getField('abOption_cPage_regenerateThumbnailsAdvanced', 'tab1', 'rtaOTF');
|
3 |
Plugin Name: reGenerate Thumbnails - advanced
|
4 |
Plugin URI: http://turcuciprian.com
|
5 |
Description: A plugin that makes regenerating thumbnails even easier than before and more flexible.
|
6 |
+
Version: 1.1.6
|
7 |
Author: turcuciprian
|
8 |
+
Author URI: http://admin-builder.com
|
9 |
License: GPLv2 or later
|
10 |
Text Domain: RTA
|
11 |
*/
|
28 |
function rtaInit()
|
29 |
{
|
30 |
global $abGen;
|
31 |
+
if (!method_exists($abGen, 'getField')) {
|
32 |
return true;
|
33 |
}
|
34 |
$rotf = $abGen->getField('abOption_cPage_regenerateThumbnailsAdvanced', 'tab1', 'rtaOTF');
|