Version Description
- Alternate CRON for 5.6.1 re-tested
- Adjusted processing function
- Tested copying with broken post content
Download this release
Release Info
Developer | iclyde |
Plugin | Duplicate Post |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.9 to 1.2.0
- copy-delete-posts.php +2 -2
- post/handler.php +11 -0
- readme.txt +10 -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.
|
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.
|
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.0
|
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.0');
|
34 |
define('CDP_WP_VERSION', get_bloginfo('version'));
|
35 |
define('CDP_SCRIPT_DEBUG', false);
|
36 |
define('CDP_ROOT_DIR', __DIR__);
|
post/handler.php
CHANGED
@@ -507,6 +507,17 @@ function cdp_insert_new_post($areWePro = false) {
|
|
507 |
// Create empty array for new id(s) and error(s)
|
508 |
$results = array('ids' => array(), 'error' => 0, 'counter' => 0);
|
509 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
// Get Counter value
|
511 |
$prefix = (($site != -1) ? $wpdb->get_blog_prefix($site) : $wpdb->get_blog_prefix());
|
512 |
$newestId = $wpdb->get_results("SELECT post_id FROM {$prefix}postmeta WHERE meta_key = '_cdp_origin' AND meta_value = {$id} ORDER BY post_id DESC LIMIT 1", ARRAY_A);
|
507 |
// Create empty array for new id(s) and error(s)
|
508 |
$results = array('ids' => array(), 'error' => 0, 'counter' => 0);
|
509 |
|
510 |
+
// Prevent SQL injection
|
511 |
+
if (!is_numeric($id)) {
|
512 |
+
|
513 |
+
echo json_encode(array('status' => 'error', 'message' => __('Invalid ID argument.', 'copy-delete-posts')));
|
514 |
+
exit;
|
515 |
+
|
516 |
+
}
|
517 |
+
|
518 |
+
// And just in case
|
519 |
+
$id = esc_sql(intval($id));
|
520 |
+
|
521 |
// Get Counter value
|
522 |
$prefix = (($site != -1) ? $wpdb->get_blog_prefix($site) : $wpdb->get_blog_prefix());
|
523 |
$newestId = $wpdb->get_results("SELECT post_id FROM {$prefix}postmeta WHERE meta_key = '_cdp_origin' AND meta_value = {$id} ORDER BY post_id DESC LIMIT 1", ARRAY_A);
|
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.8.1
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv3
|
8 |
Requires PHP: 5.6
|
9 |
|
@@ -151,6 +151,11 @@ Copy Delete Posts WordPress plugin doesn’t store any site visitor information
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
|
|
|
|
154 |
= 1.1.9 =
|
155 |
* Plugin translation-ready
|
156 |
* Updated styles
|
@@ -250,9 +255,7 @@ Copy Delete Posts WordPress plugin doesn’t store any site visitor information
|
|
250 |
* Initial release
|
251 |
|
252 |
== Upgrade Notice ==
|
253 |
-
= 1.
|
254 |
-
*
|
255 |
-
*
|
256 |
-
*
|
257 |
-
* Added logs for last 50 copy processes
|
258 |
-
* Added new notices
|
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.8.1
|
6 |
+
Stable tag: 1.2.0
|
7 |
License: GPLv3
|
8 |
Requires PHP: 5.6
|
9 |
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 1.2.0 =
|
155 |
+
* Alternate CRON for 5.6.1 re-tested
|
156 |
+
* Adjusted processing function
|
157 |
+
* Tested copying with broken post content
|
158 |
+
|
159 |
= 1.1.9 =
|
160 |
* Plugin translation-ready
|
161 |
* Updated styles
|
255 |
* Initial release
|
256 |
|
257 |
== Upgrade Notice ==
|
258 |
+
= 1.2.0 =
|
259 |
+
* Alternate CRON for 5.6.1 re-tested
|
260 |
+
* Adjusted processing function
|
261 |
+
* Tested copying with broken post content
|
|
|
|