Version Description
Download this release
Release Info
| Developer | lopo |
| Plugin | |
| Version | 0.5 |
| Comparing to | |
| See all releases | |
Code changes from version 0.4 to 0.5
- duplicate-post.php +8 -6
- readme.txt +2 -2
- todo.txt +0 -1
duplicate-post.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Duplicate Post
|
| 4 |
Plugin URI: http://www.lopo.it/duplicate-post.tar.gz
|
| 5 |
Description: Create a copy of a post.
|
| 6 |
-
Version: 0.
|
| 7 |
Author: Enrico Battocchi
|
| 8 |
Author URI: http://www.lopo.it
|
| 9 |
*/
|
|
@@ -26,7 +26,7 @@ Author URI: http://www.lopo.it
|
|
| 26 |
*/
|
| 27 |
|
| 28 |
// Version of the plugin
|
| 29 |
-
define('DUPLICATE_POST_CURRENT_VERSION', '0.
|
| 30 |
define('DUPLICATE_POST_COLUMN', 'control_duplicate_post');
|
| 31 |
define('DUPLICATE_POST_VIEW_USER_LEVEL_OPTION', 'duplicate_post_view_user_level');
|
| 32 |
define('DUPLICATE_POST_CREATE_USER_LEVEL_OPTION', 'duplicate_post_create_user_level');
|
|
@@ -398,10 +398,12 @@ function duplicate_post_copy_post_meta_info($id, $new_id) {
|
|
| 398 |
for ($i=0; $i<count($post_meta_infos); $i++) {
|
| 399 |
$meta_info = $post_meta_infos[$i];
|
| 400 |
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
$sql_query .= "SELECT $new_id, '$meta_info->meta_key', '$
|
|
|
|
|
|
|
| 405 |
}
|
| 406 |
}
|
| 407 |
|
| 3 |
Plugin Name: Duplicate Post
|
| 4 |
Plugin URI: http://www.lopo.it/duplicate-post.tar.gz
|
| 5 |
Description: Create a copy of a post.
|
| 6 |
+
Version: 0.5
|
| 7 |
Author: Enrico Battocchi
|
| 8 |
Author URI: http://www.lopo.it
|
| 9 |
*/
|
| 26 |
*/
|
| 27 |
|
| 28 |
// Version of the plugin
|
| 29 |
+
define('DUPLICATE_POST_CURRENT_VERSION', '0.5' );
|
| 30 |
define('DUPLICATE_POST_COLUMN', 'control_duplicate_post');
|
| 31 |
define('DUPLICATE_POST_VIEW_USER_LEVEL_OPTION', 'duplicate_post_view_user_level');
|
| 32 |
define('DUPLICATE_POST_CREATE_USER_LEVEL_OPTION', 'duplicate_post_create_user_level');
|
| 398 |
for ($i=0; $i<count($post_meta_infos); $i++) {
|
| 399 |
$meta_info = $post_meta_infos[$i];
|
| 400 |
|
| 401 |
+
$meta_value = addslashes($meta_info->meta_value);
|
| 402 |
+
|
| 403 |
+
if ($i<count($post_meta_infos)-1) {
|
| 404 |
+
$sql_query .= "SELECT $new_id, '$meta_info->meta_key', '$meta_value' UNION ALL ";
|
| 405 |
+
} else {
|
| 406 |
+
$sql_query .= "SELECT $new_id, '$meta_info->meta_key', '$meta_value'";
|
| 407 |
}
|
| 408 |
}
|
| 409 |
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: lopo
|
| 3 |
Tags: duplicate, post
|
| 4 |
Requires at least: 2.3
|
| 5 |
-
Tested up to: 2.
|
| 6 |
-
Stable tag: 0.
|
| 7 |
|
| 8 |
Create a copy of a post.
|
| 9 |
|
| 2 |
Contributors: lopo
|
| 3 |
Tags: duplicate, post
|
| 4 |
Requires at least: 2.3
|
| 5 |
+
Tested up to: 2.7
|
| 6 |
+
Stable tag: 0.5
|
| 7 |
|
| 8 |
Create a copy of a post.
|
| 9 |
|
todo.txt
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
|
|
|
