Duplicate Post - Version 1.2.7

Version Description

  • Changed sensitivity of performance check
  • Added new feature for copying different kinds of posts
  • Updated logic of mirroring metadata posts
  • Retested plugin with latest Gutenberg version
  • Fully tested with WordPress 5.9
Download this release

Release Info

Developer iclyde
Plugin Icon wp plugin Duplicate Post
Version 1.2.7
Comparing to
See all releases

Code changes from version 1.2.6 to 1.2.7

copy-delete-posts.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Copy & Delete Posts
5
  * Plugin URI: https://copy-delete-posts.com
6
  * Description: The best solution to easily make duplicates of your posts & pages, and delete them in one go.
7
- * Version: 1.2.6
8
  * Author: Copy Delete Posts
9
  * Author URI: https://copy-delete-posts.com/
10
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -30,7 +30,7 @@ analyst_init(array(
30
  * @since 1.0.0
31
  */
32
  // Plugin constants
33
- define('CDP_VERSION', '1.2.6');
34
  define('CDP_WP_VERSION', get_bloginfo('version'));
35
  define('CDP_SCRIPT_DEBUG', false);
36
  define('CDP_ROOT_DIR', __DIR__);
4
  * Plugin Name: Copy & Delete Posts
5
  * Plugin URI: https://copy-delete-posts.com
6
  * Description: The best solution to easily make duplicates of your posts & pages, and delete them in one go.
7
+ * Version: 1.2.7
8
  * Author: Copy Delete Posts
9
  * Author URI: https://copy-delete-posts.com/
10
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
30
  * @since 1.0.0
31
  */
32
  // Plugin constants
33
+ define('CDP_VERSION', '1.2.7');
34
  define('CDP_WP_VERSION', get_bloginfo('version'));
35
  define('CDP_SCRIPT_DEBUG', false);
36
  define('CDP_ROOT_DIR', __DIR__);
menu/configuration.php CHANGED
@@ -325,7 +325,6 @@ function cdp_configuration() {
325
  <td><?php _e('…be without private taxonomy.', 'copy-delete-posts'); ?></td>
326
  </tr>
327
 
328
- <?php if (false): ?>
329
  <tr>
330
  <td class="cdp-tooltip-premium">
331
  <label>
@@ -334,7 +333,7 @@ function cdp_configuration() {
334
  <input <?php echo (array_key_exists('all_metadata', $defaults) && $defaults['all_metadata']=='true' && $areWePro == true)?'checked ':''; ?>class="cdp-data-set" data-cdp-opt="all_metadata" type="checkbox" />
335
  </div>
336
  <div class="cdp-left cdp-relative" style="width: calc(100% - 45px)">
337
- <span><?php _e('Other Plugin Settings', 'copy-delete-posts'); ?><span class="cdp-premium-icon cdp-big-icon" style="top: calc(50% + 2px) !important;"></span> </span>
338
  </div>
339
  </div>
340
  </label>
@@ -342,7 +341,6 @@ function cdp_configuration() {
342
  <td><?php _e('…clone all metadata tags assigned to post/page.', 'copy-delete-posts'); ?></td>
343
  <td><?php _e('…copy only required post/page metadata.', 'copy-delete-posts'); ?></td>
344
  </tr>
345
- <?php endif; ?>
346
  <tr<?php echo (!$isWoo)?' style="display: none;"':'' ?>>
347
  <td class="cdp-tooltip-premium">
348
  <label>
325
  <td><?php _e('…be without private taxonomy.', 'copy-delete-posts'); ?></td>
326
  </tr>
327
 
 
328
  <tr>
329
  <td class="cdp-tooltip-premium">
330
  <label>
333
  <input <?php echo (array_key_exists('all_metadata', $defaults) && $defaults['all_metadata']=='true' && $areWePro == true)?'checked ':''; ?>class="cdp-data-set" data-cdp-opt="all_metadata" type="checkbox" />
334
  </div>
335
  <div class="cdp-left cdp-relative" style="width: calc(100% - 45px)">
336
+ <span><?php _e('All post meta', 'copy-delete-posts'); ?><span class="cdp-premium-icon cdp-big-icon"></span> </span>
337
  </div>
338
  </div>
339
  </label>
341
  <td><?php _e('…clone all metadata tags assigned to post/page.', 'copy-delete-posts'); ?></td>
342
  <td><?php _e('…copy only required post/page metadata.', 'copy-delete-posts'); ?></td>
343
  </tr>
 
344
  <tr<?php echo (!$isWoo)?' style="display: none;"':'' ?>>
345
  <td class="cdp-tooltip-premium">
346
  <label>
menu/modal.php CHANGED
@@ -161,9 +161,10 @@ function cdp_modal($screen = '', $profiles = array()) {
161
  <span><?php _e('Link categories', 'copy-delete-posts'); ?></span>
162
  </label>
163
  </div>
164
- <?php if ($isYoast || $isUSM || $isWoo): ?>
165
  <div class="cdp-modal-checkboxes cdp-checkboxes cdp-modal-checkboxes-three">
166
  <label class="cdp-relative"><span class="cdp-premium-icon" style="margin-left: 0"></span><b style="padding-left: 21px;" class="cdp-f-s-15 cdp-f-w-medium"><?php _e('Plugin options:', 'copy-delete-posts'); ?></b></label>
 
167
  <?php if ($isWoo): ?>
168
  <label class="cdp-woo">
169
  <div class="cdp-inline cdp-tooltip-premium-spc">
@@ -175,7 +176,7 @@ function cdp_modal($screen = '', $profiles = array()) {
175
  <?php if ($isYoast): ?>
176
  <label class="cdp-yoast">
177
  <div class="cdp-inline cdp-tooltip-premium-spc">
178
- <input class="cdp-input-dynamic" type="checkbox" name="yoast">
179
  <span><?php _e('Yoast Settings', 'copy-delete-posts'); ?></span>
180
  </div>
181
  </label>
@@ -183,19 +184,17 @@ function cdp_modal($screen = '', $profiles = array()) {
183
  <?php if ($isUSM): ?>
184
  <label>
185
  <div class="cdp-inline cdp-tooltip-premium-spc">
186
- <input class="cdp-input-dynamic" type="checkbox" name="usmplugin">
187
  <span><?php _e('USM Settings', 'copy-delete-posts'); ?></span>
188
  </div>
189
  </label>
190
  <?php endif; ?>
191
- <?php if (false): ?>
192
  <label>
193
  <div class="cdp-inline cdp-tooltip-premium-spc">
194
- <input class="cdp-input-dynamic" type="checkbox" name="all_metadata">
195
- <span><?php _e('Other Plugin Settings', 'copy-delete-posts'); ?></span>
196
  </div>
197
  </label>
198
- <?php endif; ?>
199
  </div>
200
  <?php endif; ?>
201
  </div>
161
  <span><?php _e('Link categories', 'copy-delete-posts'); ?></span>
162
  </label>
163
  </div>
164
+ <?php if ($isYoast || $isUSM || $isWoo || true): ?>
165
  <div class="cdp-modal-checkboxes cdp-checkboxes cdp-modal-checkboxes-three">
166
  <label class="cdp-relative"><span class="cdp-premium-icon" style="margin-left: 0"></span><b style="padding-left: 21px;" class="cdp-f-s-15 cdp-f-w-medium"><?php _e('Plugin options:', 'copy-delete-posts'); ?></b></label>
167
+ <br>
168
  <?php if ($isWoo): ?>
169
  <label class="cdp-woo">
170
  <div class="cdp-inline cdp-tooltip-premium-spc">
176
  <?php if ($isYoast): ?>
177
  <label class="cdp-yoast">
178
  <div class="cdp-inline cdp-tooltip-premium-spc">
179
+ <input class="cdp-modal-option-r cdp-input-dynamic" type="checkbox" name="yoast">
180
  <span><?php _e('Yoast Settings', 'copy-delete-posts'); ?></span>
181
  </div>
182
  </label>
184
  <?php if ($isUSM): ?>
185
  <label>
186
  <div class="cdp-inline cdp-tooltip-premium-spc">
187
+ <input class="cdp-modal-option-r cdp-input-dynamic" type="checkbox" name="usmplugin">
188
  <span><?php _e('USM Settings', 'copy-delete-posts'); ?></span>
189
  </div>
190
  </label>
191
  <?php endif; ?>
 
192
  <label>
193
  <div class="cdp-inline cdp-tooltip-premium-spc">
194
+ <input class="cdp-modal-option-r cdp-input-dynamic" type="checkbox" name="all_metadata">
195
+ <span><?php _e('All post meta', 'copy-delete-posts'); ?></span>
196
  </div>
197
  </label>
 
198
  </div>
199
  <?php endif; ?>
200
  </div>
menu/tooltips.php CHANGED
@@ -222,9 +222,10 @@ function cdp_tooltip_content($profiles = array()) {
222
  <span><?php _e('Link cats', 'copy-delete-posts'); ?></span>
223
  </label>
224
  </div>
225
- <?php if ($isYoast || $isUSM || $isWoo): ?>
226
  <div class="cdp-modal-checkboxes cdp-modal-checkboxes-three">
227
  <label class="cdp-relative"><span class="cdp-premium-icon" style="margin-left: 0"></span><b style="padding-left: 21px;" class="cdp-f-s-15 cdp-f-w-medium"><?php _e('Plugin options:', 'copy-delete-posts'); ?></b></label>
 
228
  <?php if ($isWoo): ?>
229
  <label class="cdp-woo">
230
  <div class="cdp-inline cdp-tooltip-premium-spc">
@@ -249,14 +250,12 @@ function cdp_tooltip_content($profiles = array()) {
249
  </div>
250
  </label>
251
  <?php endif; ?>
252
- <?php if (false): ?>
253
  <label>
254
  <div class="cdp-inline cdp-tooltip-premium-spc">
255
  <input class="cdp-input-dynamic" type="checkbox" name="all_metadata">
256
- <span><?php _e('Other Plugin Settings', 'copy-delete-posts'); ?></span>
257
  </div>
258
  </label>
259
- <?php endif; ?>
260
  </div>
261
  <?php endif; ?>
262
 
222
  <span><?php _e('Link cats', 'copy-delete-posts'); ?></span>
223
  </label>
224
  </div>
225
+ <?php if ($isYoast || $isUSM || $isWoo || true): ?>
226
  <div class="cdp-modal-checkboxes cdp-modal-checkboxes-three">
227
  <label class="cdp-relative"><span class="cdp-premium-icon" style="margin-left: 0"></span><b style="padding-left: 21px;" class="cdp-f-s-15 cdp-f-w-medium"><?php _e('Plugin options:', 'copy-delete-posts'); ?></b></label>
228
+ <br>
229
  <?php if ($isWoo): ?>
230
  <label class="cdp-woo">
231
  <div class="cdp-inline cdp-tooltip-premium-spc">
250
  </div>
251
  </label>
252
  <?php endif; ?>
 
253
  <label>
254
  <div class="cdp-inline cdp-tooltip-premium-spc">
255
  <input class="cdp-input-dynamic" type="checkbox" name="all_metadata">
256
+ <span><?php _e('All post meta', 'copy-delete-posts'); ?></span>
257
  </div>
258
  </label>
 
259
  </div>
260
  <?php endif; ?>
261
 
post/handler.php CHANGED
@@ -245,6 +245,7 @@ function cdp_save_plugin_options($areWePro) {
245
  $already[$profile]['usmplugin'] = 'false';
246
  $already[$profile]['yoast'] = 'false';
247
  $already[$profile]['woo'] = 'false';
 
248
  if ($areWePro)
249
  $already[$profile] = cdpp_filter_premium_opts($already, $options, $profile);
250
 
@@ -433,10 +434,10 @@ function cdp_insert_new_post($areWePro = false) {
433
  $f = ($meta == '_thumbnail_id' && $settings['f_image']) ? true : false;
434
  $g = ($meta == '_cdp_origin') ? true : false;
435
  $h = (mb_substr($meta, 0, 11) == '_elementor_') ? true : false;
436
- // $i = (isset($settings['all_metadata']) && $settings['all_metadata'] == 'true') ? true : false;
437
 
438
  // If any of above condition is true pass the meta tag
439
- if ($a || $b || $c || $d || $e || $f || $g || $h /*|| $i*/) {
440
 
441
  // Prepare data and insert filtered to results
442
  foreach ($vals as $val)
245
  $already[$profile]['usmplugin'] = 'false';
246
  $already[$profile]['yoast'] = 'false';
247
  $already[$profile]['woo'] = 'false';
248
+ $already[$profile]['all_metadata'] = 'false';
249
  if ($areWePro)
250
  $already[$profile] = cdpp_filter_premium_opts($already, $options, $profile);
251
 
434
  $f = ($meta == '_thumbnail_id' && $settings['f_image']) ? true : false;
435
  $g = ($meta == '_cdp_origin') ? true : false;
436
  $h = (mb_substr($meta, 0, 11) == '_elementor_') ? true : false;
437
+ $i = ($areWePro && function_exists('cdpp_check_all_meta')) ? cdpp_check_all_meta($settings, $meta) : false;
438
 
439
  // If any of above condition is true pass the meta tag
440
+ if ($a || $b || $c || $d || $e || $f || $g || $h || $i) {
441
 
442
  // Prepare data and insert filtered to results
443
  foreach ($vals as $val)
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: CopyDeletePosts, copydelete
3
  Tags: Duplicate post, Copy posts, Copy pages, Duplicate posts, Duplicate pages, Clone posts, Clone pages, Delete posts, Delete pages, Duplicator, copy post, copy page
4
  Requires at least: 4.6
5
  Tested up to: 5.9
6
- Stable tag: 1.2.6
7
  License: GPLv3
8
  Requires PHP: 5.6
9
 
@@ -151,6 +151,13 @@ Copy Delete Posts WordPress plugin doesn’t store any site visitor information
151
 
152
  == Changelog ==
153
 
 
 
 
 
 
 
 
154
  = 1.2.6 =
155
  * Tested with WordPress 5.9-RC1
156
  * Updated tooltips
@@ -279,6 +286,9 @@ Copy Delete Posts WordPress plugin doesn’t store any site visitor information
279
  * Initial release
280
 
281
  == Upgrade Notice ==
282
- = 1.2.6 =
283
- * Tested with WordPress 5.9-RC1
284
- * Updated tooltips
 
 
 
3
  Tags: Duplicate post, Copy posts, Copy pages, Duplicate posts, Duplicate pages, Clone posts, Clone pages, Delete posts, Delete pages, Duplicator, copy post, copy page
4
  Requires at least: 4.6
5
  Tested up to: 5.9
6
+ Stable tag: 1.2.7
7
  License: GPLv3
8
  Requires PHP: 5.6
9
 
151
 
152
  == Changelog ==
153
 
154
+ = 1.2.7 =
155
+ * Changed sensitivity of performance check
156
+ * Added new feature for copying different kinds of posts
157
+ * Updated logic of mirroring metadata posts
158
+ * Retested plugin with latest Gutenberg version
159
+ * Fully tested with WordPress 5.9
160
+
161
  = 1.2.6 =
162
  * Tested with WordPress 5.9-RC1
163
  * Updated tooltips
286
  * Initial release
287
 
288
  == Upgrade Notice ==
289
+ = 1.2.7 =
290
+ * Changed sensitivity of performance check
291
+ * Added new feature for copying different kinds of posts
292
+ * Updated logic of mirroring metadata posts
293
+ * Retested plugin with latest Gutenberg version
294
+ * Fully tested with WordPress 5.9