Version Description
Fixes a couple of bug. Recommended if you have problems with v2.4
Download this release
Release Info
Developer | lopo |
Plugin | Duplicate Post |
Version | 2.4.1 |
Comparing to | |
See all releases |
Code changes from version 2.4 to 2.4.1
- duplicate-post-admin.php +2 -5
- duplicate-post.php +2 -2
- readme.txt +18 -7
duplicate-post-admin.php
CHANGED
@@ -295,10 +295,8 @@ function duplicate_post_create_duplicate($post, $status = '', $parent_id = '') {
|
|
295 |
|
296 |
$new_post = array(
|
297 |
'menu_order' => $post->menu_order,
|
298 |
-
'guid' => $post->guid,
|
299 |
'comment_status' => $post->comment_status,
|
300 |
'ping_status' => $post->ping_status,
|
301 |
-
'pinged' => $post->pinged,
|
302 |
'post_author' => $new_post_author->ID,
|
303 |
'post_content' => $post->post_content,
|
304 |
'post_excerpt' => (get_option('duplicate_post_copyexcerpt') == '1') ? $post->post_excerpt : "",
|
@@ -308,7 +306,6 @@ function duplicate_post_create_duplicate($post, $status = '', $parent_id = '') {
|
|
308 |
'post_status' => $new_post_status = (empty($status))? $post->post_status: $status,
|
309 |
'post_title' => $prefix.$post->post_title.$suffix,
|
310 |
'post_type' => $post->post_type,
|
311 |
-
'to_ping' => $post->to_ping
|
312 |
);
|
313 |
|
314 |
if(get_option('duplicate_post_copydate') == 1){
|
@@ -329,8 +326,8 @@ function duplicate_post_create_duplicate($post, $status = '', $parent_id = '') {
|
|
329 |
delete_post_meta($new_post_id, '_dp_original');
|
330 |
add_post_meta($new_post_id, '_dp_original', $post->ID);
|
331 |
|
332 |
-
// If the copy is
|
333 |
-
if ($new_post_status
|
334 |
$post_name = wp_unique_post_slug($post->post_name, $new_post_id, $new_post_status, $post->post_type, $new_post_parent);
|
335 |
|
336 |
$new_post = array();
|
295 |
|
296 |
$new_post = array(
|
297 |
'menu_order' => $post->menu_order,
|
|
|
298 |
'comment_status' => $post->comment_status,
|
299 |
'ping_status' => $post->ping_status,
|
|
|
300 |
'post_author' => $new_post_author->ID,
|
301 |
'post_content' => $post->post_content,
|
302 |
'post_excerpt' => (get_option('duplicate_post_copyexcerpt') == '1') ? $post->post_excerpt : "",
|
306 |
'post_status' => $new_post_status = (empty($status))? $post->post_status: $status,
|
307 |
'post_title' => $prefix.$post->post_title.$suffix,
|
308 |
'post_type' => $post->post_type,
|
|
|
309 |
);
|
310 |
|
311 |
if(get_option('duplicate_post_copydate') == 1){
|
326 |
delete_post_meta($new_post_id, '_dp_original');
|
327 |
add_post_meta($new_post_id, '_dp_original', $post->ID);
|
328 |
|
329 |
+
// If the copy is published or scheduled, we have to set a proper slug.
|
330 |
+
if ($new_post_status == 'publish' || $new_post_status == 'future'){
|
331 |
$post_name = wp_unique_post_slug($post->post_name, $new_post_id, $new_post_status, $post->post_type, $new_post_parent);
|
332 |
|
333 |
$new_post = array();
|
duplicate-post.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Duplicate Post
|
4 |
Plugin URI: http://lopo.it/duplicate-post-plugin/
|
5 |
Description: Clone posts and pages.
|
6 |
-
Version: 2.4
|
7 |
Author: Enrico Battocchi
|
8 |
Author URI: http://lopo.it
|
9 |
Text Domain: duplicate-post
|
@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
30 |
define('DUPLICATE_POST_I18N_DOMAIN', 'duplicate-post');
|
31 |
|
32 |
// Version of the plugin
|
33 |
-
define('DUPLICATE_POST_CURRENT_VERSION', '2.4' );
|
34 |
|
35 |
/**
|
36 |
* Initialise the internationalisation domain
|
3 |
Plugin Name: Duplicate Post
|
4 |
Plugin URI: http://lopo.it/duplicate-post-plugin/
|
5 |
Description: Clone posts and pages.
|
6 |
+
Version: 2.4.1
|
7 |
Author: Enrico Battocchi
|
8 |
Author URI: http://lopo.it
|
9 |
Text Domain: duplicate-post
|
30 |
define('DUPLICATE_POST_I18N_DOMAIN', 'duplicate-post');
|
31 |
|
32 |
// Version of the plugin
|
33 |
+
define('DUPLICATE_POST_CURRENT_VERSION', '2.4.1' );
|
34 |
|
35 |
/**
|
36 |
* Initialise the internationalisation domain
|
readme.txt
CHANGED
@@ -4,13 +4,18 @@ Donate link: http://lopo.it/duplicate-post-plugin/
|
|
4 |
Tags: duplicate post, copy, clone
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.3.2
|
7 |
-
Stable tag: 2.4
|
|
|
8 |
|
9 |
Clone posts and pages.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
This plugin allows to clone a post or page, or edit it as a new draft.
|
|
|
|
|
|
|
|
|
14 |
|
15 |
1. In 'Edit Posts'/'Edit Pages', you can click on 'Clone' link below the post/page title: this will immediately create a copy and return to the list.
|
16 |
|
@@ -43,16 +48,14 @@ If you want to contribute to translate the plugin in languages other than Englis
|
|
43 |
|
44 |
Thanks for all the suggestions, bug reports, translations and donations, they're frankly too many to be listed here!
|
45 |
|
46 |
-
An example of use: I started this for a small movie theater website which I was building. Every Friday there's a new movie showing with a new timetable, and thus a new post: but sometimes a movie stays for more than a week, so I need to copy the last post and change only the dates, leaving movie title, director's and actors' names etc. unchanged.
|
47 |
-
The website is http://www.kino-desse.org and the cinema is located in Livorno, Italy.
|
48 |
-
|
49 |
== Installation ==
|
50 |
|
51 |
Use WordPress' Add New Plugin feature, searching "Duplicate Post", or download the archive and:
|
52 |
|
53 |
-
1.
|
54 |
-
2.
|
55 |
-
3.
|
|
|
56 |
|
57 |
== Frequently Asked Questions ==
|
58 |
|
@@ -82,6 +85,9 @@ There is an open ticket in WordPress Trac, as other plugin developers too are in
|
|
82 |
|
83 |
== Upgrade Notice ==
|
84 |
|
|
|
|
|
|
|
85 |
= 2.4 =
|
86 |
Copy child pages + a couple of bugfixes + licence switch to GPLv2
|
87 |
|
@@ -114,6 +120,11 @@ New features and customization, WP 3.0 compatibility: you should upgrade if you
|
|
114 |
|
115 |
== Changelog ==
|
116 |
|
|
|
|
|
|
|
|
|
|
|
117 |
= 2.4 =
|
118 |
* New option to clone the children of the original page
|
119 |
* Licence changed to GPLv2 or later
|
4 |
Tags: duplicate post, copy, clone
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.3.2
|
7 |
+
Stable tag: 2.4.1
|
8 |
+
License: GPLv2 or later
|
9 |
|
10 |
Clone posts and pages.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
This plugin allows to clone a post or page, or edit it as a new draft.
|
15 |
+
If you find this useful, [**please consider donating**](http://wordpress.org/plugins/duplicate-post/) whatever sum you choose, **even just 10 cents**. It's been downloaded thousands of times: just a few cents from every user would help me develop the plugin and improve support.
|
16 |
+
|
17 |
+
|
18 |
+
How it works:
|
19 |
|
20 |
1. In 'Edit Posts'/'Edit Pages', you can click on 'Clone' link below the post/page title: this will immediately create a copy and return to the list.
|
21 |
|
48 |
|
49 |
Thanks for all the suggestions, bug reports, translations and donations, they're frankly too many to be listed here!
|
50 |
|
|
|
|
|
|
|
51 |
== Installation ==
|
52 |
|
53 |
Use WordPress' Add New Plugin feature, searching "Duplicate Post", or download the archive and:
|
54 |
|
55 |
+
1. Unzip the archive on your computer
|
56 |
+
2. Upload `duplicate-post` directory to the `/wp-content/plugins/` directory
|
57 |
+
3. Activate the plugin through the 'Plugins' menu in WordPress
|
58 |
+
4. Go to Settings -> Duplicate Post and customize behaviour as needed
|
59 |
|
60 |
== Frequently Asked Questions ==
|
61 |
|
85 |
|
86 |
== Upgrade Notice ==
|
87 |
|
88 |
+
= 2.4.1 =
|
89 |
+
Fixes a couple of bug. Recommended if you have problems with v2.4
|
90 |
+
|
91 |
= 2.4 =
|
92 |
Copy child pages + a couple of bugfixes + licence switch to GPLv2
|
93 |
|
120 |
|
121 |
== Changelog ==
|
122 |
|
123 |
+
= 2.4.1 =
|
124 |
+
* Fixed regression about draft permalinks
|
125 |
+
* Fixed bug with guid
|
126 |
+
* Don't clone to_ping and pinged (maybe there will be an option about those later)
|
127 |
+
|
128 |
= 2.4 =
|
129 |
* New option to clone the children of the original page
|
130 |
* Licence changed to GPLv2 or later
|