Duplicate Post - Version 2.0.2

Version Description

Fixed permalink bug + double choice on posts list

Download this release

Release Info

Developer lopo
Plugin Icon 128x128 Duplicate Post
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

duplicate-post-admin.php CHANGED
@@ -6,7 +6,7 @@ return;
6
  require_once (dirname(__FILE__).'/duplicate-post-options.php');
7
 
8
  // Version of the plugin
9
- define('DUPLICATE_POST_CURRENT_VERSION', '2.0.1' );
10
 
11
  /**
12
  * Wrapper for the option 'duplicate_post_version'
@@ -57,8 +57,22 @@ function duplicate_post_plugin_activation() {
57
  }
58
  // Update version number
59
  update_option( 'duplicate_post_version', duplicate_post_get_current_version() );
 
 
 
60
  }
61
 
 
 
 
 
 
 
 
 
 
 
 
62
  add_filter('post_row_actions', 'duplicate_post_make_duplicate_link_row',10,2);
63
  add_filter('page_row_actions', 'duplicate_post_make_duplicate_link_row',10,2);
64
 
@@ -68,10 +82,14 @@ add_filter('page_row_actions', 'duplicate_post_make_duplicate_link_row',10,2);
68
  function duplicate_post_make_duplicate_link_row($actions, $post) {
69
  if (duplicate_post_is_current_user_allowed_to_copy()) {
70
  $theUrl = admin_url('admin.php?action=duplicate_post_save_as_new_post&post=' . $post->ID);
 
71
  $post_type_obj = get_post_type_object( $post->post_type );
72
  $actions['duplicate'] = '<a href="'.$theUrl.'" title="'
73
  . esc_attr(__("Clone this item", DUPLICATE_POST_I18N_DOMAIN))
74
- . '" rel="permalink">' . __("Duplicate", DUPLICATE_POST_I18N_DOMAIN) . '</a>';
 
 
 
75
  }
76
  return $actions;
77
  }
@@ -247,9 +265,9 @@ function duplicate_post_create_duplicate($post, $status = '') {
247
  // Insert the new template in the post table
248
  $wpdb->query(
249
  "INSERT INTO $wpdb->posts
250
- (post_author, post_date, post_date_gmt, post_content, post_content_filtered, post_title, post_excerpt, post_status, post_type, comment_status, ping_status, post_password, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type, post_name)
251
  VALUES
252
- ('$new_post_author->ID', '$new_post_date', '$new_post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$new_post_status', '$new_post_type', '$comment_status', '$ping_status', '$post->post_password', '$post->to_ping', '$post->pinged', '$new_post_date', '$new_post_date_gmt', '$post->post_parent', '$post->menu_order', '$post->post_mime_type', '$post_name')");
253
 
254
  $new_post_id = $wpdb->insert_id;
255
 
@@ -268,14 +286,17 @@ function duplicate_post_create_duplicate($post, $status = '') {
268
  else
269
  do_action( 'dp_duplicate_post', $new_post_id, $post );
270
 
271
- $post_name = wp_unique_post_slug($post_name, $new_post_id, $new_post_status, $new_post_type, $post->post_parent);
 
 
272
 
273
- $new_post = array();
274
- $new_post['ID'] = $new_post_id;
275
- $new_post['post_name'] = $post_name;
276
 
277
- // Update the post into the database
278
- wp_update_post( $new_post );
 
279
 
280
  return $new_post_id;
281
  }
6
  require_once (dirname(__FILE__).'/duplicate-post-options.php');
7
 
8
  // Version of the plugin
9
+ define('DUPLICATE_POST_CURRENT_VERSION', '2.0.2' );
10
 
11
  /**
12
  * Wrapper for the option 'duplicate_post_version'
57
  }
58
  // Update version number
59
  update_option( 'duplicate_post_version', duplicate_post_get_current_version() );
60
+
61
+ // enable notice
62
+ update_option('dp_notice', 1);
63
  }
64
 
65
+
66
+ function dp_admin_notice(){
67
+ echo '<div class="updated">
68
+ <p>'.sprintf(__('<strong>Duplicate Post</strong> now has two different ways to work: you can clone immediately or you can copy to a new draft to edit.<br/>
69
+ Learn more on the <a href="%s">plugin page</a>.', DUPLICATE_POST_I18N_DOMAIN), "http://wordpress.org/extend/plugins/duplicate-post/").'</p>
70
+ </div>';
71
+ update_option('dp_notice', 0);
72
+ }
73
+
74
+ if(get_option('dp_notice') != 0) add_action('admin_notices', 'dp_admin_notice');
75
+
76
  add_filter('post_row_actions', 'duplicate_post_make_duplicate_link_row',10,2);
77
  add_filter('page_row_actions', 'duplicate_post_make_duplicate_link_row',10,2);
78
 
82
  function duplicate_post_make_duplicate_link_row($actions, $post) {
83
  if (duplicate_post_is_current_user_allowed_to_copy()) {
84
  $theUrl = admin_url('admin.php?action=duplicate_post_save_as_new_post&amp;post=' . $post->ID);
85
+ $theUrlDraft = admin_url('admin.php?action=duplicate_post_save_as_new_post_draft&amp;post=' . $post->ID);
86
  $post_type_obj = get_post_type_object( $post->post_type );
87
  $actions['duplicate'] = '<a href="'.$theUrl.'" title="'
88
  . esc_attr(__("Clone this item", DUPLICATE_POST_I18N_DOMAIN))
89
+ . '" rel="permalink">' . __('Clone', DUPLICATE_POST_I18N_DOMAIN) . '</a>';
90
+ $actions['edit_as_new_draft'] = '<a href="'.$theUrlDraft.'" title="'
91
+ . esc_attr(__('Copy to a new draft', DUPLICATE_POST_I18N_DOMAIN))
92
+ . '" rel="permalink">' . __('New Draft', DUPLICATE_POST_I18N_DOMAIN) . '</a>';
93
  }
94
  return $actions;
95
  }
265
  // Insert the new template in the post table
266
  $wpdb->query(
267
  "INSERT INTO $wpdb->posts
268
+ (post_author, post_date, post_date_gmt, post_content, post_content_filtered, post_title, post_excerpt, post_status, post_type, comment_status, ping_status, post_password, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type)
269
  VALUES
270
+ ('$new_post_author->ID', '$new_post_date', '$new_post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$new_post_status', '$new_post_type', '$comment_status', '$ping_status', '$post->post_password', '$post->to_ping', '$post->pinged', '$new_post_date', '$new_post_date_gmt', '$post->post_parent', '$post->menu_order', '$post->post_mime_type')");
271
 
272
  $new_post_id = $wpdb->insert_id;
273
 
286
  else
287
  do_action( 'dp_duplicate_post', $new_post_id, $post );
288
 
289
+ // If the copy gets immediately published, we have to set a proper slug.
290
+ if ($new_post_status == 'publish'){
291
+ $post_name = wp_unique_post_slug($post_name, $new_post_id, $new_post_status, $new_post_type, $post->post_parent);
292
 
293
+ $new_post = array();
294
+ $new_post['ID'] = $new_post_id;
295
+ $new_post['post_name'] = $post_name;
296
 
297
+ // Update the post into the database
298
+ wp_update_post( $new_post );
299
+ }
300
 
301
  return $new_post_id;
302
  }
duplicate-post-common.php CHANGED
@@ -60,11 +60,11 @@ function duplicate_post_clone_post_link( $link = null, $before = '', $after = ''
60
  return;
61
 
62
  if ( null === $link )
63
- $link = __('Clone', DUPLICATE_POST_I18N_DOMAIN);
64
 
65
  $post_type_obj = get_post_type_object( $post->post_type );
66
  $link = '<a class="post-clone-link" href="' . $url . '" title="'
67
- . esc_attr(__("Clone this item", DUPLICATE_POST_I18N_DOMAIN))
68
  .'">' . $link . '</a>';
69
  echo $before . apply_filters( 'duplicate_post_clone_post_link', $link, $post->ID ) . $after;
70
  }
60
  return;
61
 
62
  if ( null === $link )
63
+ $link = __('Copy to a new draft', DUPLICATE_POST_I18N_DOMAIN);
64
 
65
  $post_type_obj = get_post_type_object( $post->post_type );
66
  $link = '<a class="post-clone-link" href="' . $url . '" title="'
67
+ . esc_attr(__("Copy to a new draft", DUPLICATE_POST_I18N_DOMAIN))
68
  .'">' . $link . '</a>';
69
  echo $before . apply_filters( 'duplicate_post_clone_post_link', $link, $post->ID ) . $after;
70
  }
duplicate-post-options.php CHANGED
@@ -39,7 +39,7 @@ function duplicate_post_options() {
39
  <th scope="row"><?php _e("Copy post/page date also", DUPLICATE_POST_I18N_DOMAIN); ?>
40
  </th>
41
  <td><input type="checkbox" name="duplicate_post_copydate" value="1" <?php if(get_option('duplicate_post_copydate') == 1) echo 'checked="checked"'; ?>"/>
42
- <span class="description"><?php _e("Normally, the new draft has publication date set to current time: check the box to copy the original post/page date", DUPLICATE_POST_I18N_DOMAIN); ?>
43
  </span>
44
  </td>
45
  </tr>
@@ -47,7 +47,7 @@ function duplicate_post_options() {
47
  <th scope="row"><?php _e("Copy post/page status", DUPLICATE_POST_I18N_DOMAIN); ?>
48
  </th>
49
  <td><input type="checkbox" name="duplicate_post_copystatus" value="1" <?php if(get_option('duplicate_post_copystatus') == 1) echo 'checked="checked"'; ?>"/>
50
- <span class="description"><?php _e("Copy the original post status (draft, published, pending) when cloning from the post list. Cloning from the edit screen will always create a new draft.", DUPLICATE_POST_I18N_DOMAIN); ?>
51
  </span>
52
  </td>
53
  </tr>
@@ -65,7 +65,7 @@ function duplicate_post_options() {
65
  </th>
66
  <td><input type="text" name="duplicate_post_blacklist"
67
  value="<?php echo get_option('duplicate_post_blacklist'); ?>" /> <span
68
- class="description"><?php _e("Comma-separated list of meta fields that must not be copied when cloning a post/page", DUPLICATE_POST_I18N_DOMAIN); ?>
69
  </span>
70
  </td>
71
  </tr>
@@ -93,7 +93,7 @@ function duplicate_post_options() {
93
  </th>
94
  <td><input type="text" name="duplicate_post_title_prefix"
95
  value="<?php echo get_option('duplicate_post_title_prefix'); ?>" />
96
- <span class="description"><?php _e("Prefix to be added before the original title when cloning a post/page, e.g. \"Copy of\" (blank for no prefix)", DUPLICATE_POST_I18N_DOMAIN); ?>
97
  </span>
98
  </td>
99
  </tr>
@@ -102,7 +102,7 @@ function duplicate_post_options() {
102
  </th>
103
  <td><input type="text" name="duplicate_post_title_suffix"
104
  value="<?php echo get_option('duplicate_post_title_suffix'); ?>" />
105
- <span class="description"><?php _e("Suffix to be added after the original title when cloning a post/page, e.g. \"(dup)\" (blank for no suffix)", DUPLICATE_POST_I18N_DOMAIN); ?>
106
  </span>
107
  </td>
108
  </tr>
39
  <th scope="row"><?php _e("Copy post/page date also", DUPLICATE_POST_I18N_DOMAIN); ?>
40
  </th>
41
  <td><input type="checkbox" name="duplicate_post_copydate" value="1" <?php if(get_option('duplicate_post_copydate') == 1) echo 'checked="checked"'; ?>"/>
42
+ <span class="description"><?php _e("Normally, the new copy has its publication date set to current time: check the box to copy the original post/page date", DUPLICATE_POST_I18N_DOMAIN); ?>
43
  </span>
44
  </td>
45
  </tr>
47
  <th scope="row"><?php _e("Copy post/page status", DUPLICATE_POST_I18N_DOMAIN); ?>
48
  </th>
49
  <td><input type="checkbox" name="duplicate_post_copystatus" value="1" <?php if(get_option('duplicate_post_copystatus') == 1) echo 'checked="checked"'; ?>"/>
50
+ <span class="description"><?php _e("Copy the original post status (draft, published, pending) when cloning from the post list.", DUPLICATE_POST_I18N_DOMAIN); ?>
51
  </span>
52
  </td>
53
  </tr>
65
  </th>
66
  <td><input type="text" name="duplicate_post_blacklist"
67
  value="<?php echo get_option('duplicate_post_blacklist'); ?>" /> <span
68
+ class="description"><?php _e("Comma-separated list of meta fields that must not be copied", DUPLICATE_POST_I18N_DOMAIN); ?>
69
  </span>
70
  </td>
71
  </tr>
93
  </th>
94
  <td><input type="text" name="duplicate_post_title_prefix"
95
  value="<?php echo get_option('duplicate_post_title_prefix'); ?>" />
96
+ <span class="description"><?php _e("Prefix to be added before the original title, e.g. \"Copy of\" (blank for no prefix)", DUPLICATE_POST_I18N_DOMAIN); ?>
97
  </span>
98
  </td>
99
  </tr>
102
  </th>
103
  <td><input type="text" name="duplicate_post_title_suffix"
104
  value="<?php echo get_option('duplicate_post_title_suffix'); ?>" />
105
+ <span class="description"><?php _e("Suffix to be added after the original title, e.g. \"(dup)\" (blank for no suffix)", DUPLICATE_POST_I18N_DOMAIN); ?>
106
  </span>
107
  </td>
108
  </tr>
duplicate-post.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: Duplicate Post
4
  Plugin URI: http://lopo.it/duplicate-post-plugin/
5
- Description: Creates a copy of a post.
6
- Version: 2.0.1
7
  Author: Enrico Battocchi
8
  Author URI: http://lopo.it
9
  Text Domain: duplicate-post
2
  /*
3
  Plugin Name: Duplicate Post
4
  Plugin URI: http://lopo.it/duplicate-post-plugin/
5
+ Description: Clone posts and pages.
6
+ Version: 2.0.2
7
  Author: Enrico Battocchi
8
  Author URI: http://lopo.it
9
  Text Domain: duplicate-post
languages/duplicate-post-it_IT.mo CHANGED
Binary file
languages/duplicate-post-it_IT.po CHANGED
@@ -6,44 +6,58 @@
6
  msgid ""
7
  msgstr ""
8
  "Project-Id-Version: duplicate-post\n"
9
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/duplicate-post\n"
10
- "POT-Creation-Date: 2011-12-08 14:06:45+00:00\n"
11
- "PO-Revision-Date: 2011-12-08 15:12+0100\n"
12
- "Last-Translator: Enrico Battocchi <enrico.battocchi@gmail.com>\n"
13
  "Language-Team: Italian <it@li.org>\n"
14
- "Language: it\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
- "X-Launchpad-Export-Date: 2011-11-11 13:48+0000\n"
19
- "X-Generator: Launchpad (build 14277)\n"
20
 
21
- #: duplicate-post-admin.php:73
22
- #: duplicate-post-common.php:67
 
 
 
 
 
 
 
 
 
 
23
  msgid "Clone this item"
24
  msgstr "Clona questo elemento"
25
 
26
- #: duplicate-post-admin.php:74
27
- msgid "Duplicate"
28
- msgstr "Duplica"
29
 
30
- #: duplicate-post-admin.php:92
 
31
  msgid "Copy to a new draft"
32
  msgstr "Copia in una nuova bozza"
33
 
34
- #: duplicate-post-admin.php:119
 
 
 
 
35
  msgid "No post to duplicate has been supplied!"
36
  msgstr "Non è stato fornito alcun articolo da copiare!"
37
 
38
- #: duplicate-post-admin.php:141
39
  msgid "Copy creation failed, could not find original:"
40
  msgstr "Creazione della copia fallita, impossibile trovare l'originale:"
41
 
42
- #: duplicate-post-admin.php:289
43
  msgid "Donate"
44
  msgstr "Invia una donazione"
45
 
46
- #: duplicate-post-admin.php:290
47
  msgid "Translate"
48
  msgstr "Traduci"
49
 
@@ -51,10 +65,9 @@ msgstr "Traduci"
51
  msgid "Duplicate Post Options"
52
  msgstr "Opzioni di Duplicate Post"
53
 
54
- #. #-#-#-#-# plugin.pot (Duplicate Post 2.0) #-#-#-#-#
55
  #. Plugin Name of the plugin/theme
56
- #: duplicate-post-options.php:23
57
- #: duplicate-post-options.php:30
58
  msgid "Duplicate Post"
59
  msgstr "Duplicate Post"
60
 
@@ -63,16 +76,25 @@ msgid "Copy post/page date also"
63
  msgstr "Copia anche la data dell'articolo o pagina"
64
 
65
  #: duplicate-post-options.php:42
66
- msgid "Normally, the new draft has publication date set to current time: check the box to copy the original post/page date"
67
- msgstr "Normalmente, la nuova bozza ha la data di pubblicazione impostata all'istante corrente: spunta la casella per copiare la data dell'articolo/pagina originale"
 
 
 
 
 
68
 
69
  #: duplicate-post-options.php:47
70
  msgid "Copy post/page status"
71
  msgstr "Copia anche lo stato dell'articolo o della pagina"
72
 
73
  #: duplicate-post-options.php:50
74
- msgid "Copy the original post status (draft, published, pending) when cloning from the post list. Cloning from the edit screen will always create a new draft."
75
- msgstr "Copia lo stato dell'articolo originale (bozza, pubblicato, in sospeso) quando si clona dalla lista degli articoli. La duplicazione dalla schermata di modifica crerà sempre una nuova bozza."
 
 
 
 
76
 
77
  #: duplicate-post-options.php:55
78
  msgid "Copy excerpt"
@@ -87,8 +109,8 @@ msgid "Do not copy these fields"
87
  msgstr "Non copiare questi campi"
88
 
89
  #: duplicate-post-options.php:68
90
- msgid "Comma-separated list of meta fields that must not be copied when cloning a post/page"
91
- msgstr "Lista separata da virgole di campi personalizzati da non copiare quando viene clonato un post o una pagina"
92
 
93
  #: duplicate-post-options.php:73
94
  msgid "Do not copy these taxonomies"
@@ -103,40 +125,48 @@ msgid "Title prefix"
103
  msgstr "Prefisso del titolo"
104
 
105
  #: duplicate-post-options.php:96
106
- msgid "Prefix to be added before the original title when cloning a post/page, e.g. \"Copy of\" (blank for no prefix)"
107
- msgstr "Prefisso da aggiungere prima del titolo originale quando si clona un post o una pagina, es. \"Copia di\" (lasciare vuoto per nessun prefisso)"
 
 
 
 
108
 
109
  #: duplicate-post-options.php:101
110
  msgid "Title suffix"
111
  msgstr "Suffisso del titolo"
112
 
113
  #: duplicate-post-options.php:105
114
- msgid "Suffix to be added after the original title when cloning a post/page, e.g. \"(dup)\" (blank for no suffix)"
115
- msgstr "Suffisso da aggiungere prima del titolo originale quando si clona un post o una pagina, es. \"(copia)\" (lasciare vuoto per nessun suffisso)"
 
 
 
 
116
 
117
  #: duplicate-post-options.php:110
118
  msgid "Minimum level to copy posts"
119
  msgstr "Livello minimo per copiare gli articoli"
120
 
121
  #: duplicate-post-options.php:129
122
- msgid "Warning: users will be able to copy all posts, even those of higher level users"
123
- msgstr "Attenzione: gli utenti potranno copiare tutti gli articoli, anche quelli degli utenti di livello superiore"
 
 
 
 
124
 
125
  #: duplicate-post-options.php:138
126
  msgid "Save Changes"
127
  msgstr "Salva le modifiche"
128
 
129
- #: duplicate-post-common.php:63
130
- msgid "Clone"
131
- msgstr "Clona"
132
-
133
  #. Plugin URI of the plugin/theme
134
  msgid "http://lopo.it/duplicate-post-plugin/"
135
  msgstr "http://lopo.it/duplicate-post-plugin/"
136
 
137
  #. Description of the plugin/theme
138
- msgid "Creates a copy of a post."
139
- msgstr "Crea una copia di un articolo."
140
 
141
  #. Author of the plugin/theme
142
  msgid "Enrico Battocchi"
@@ -146,16 +176,45 @@ msgstr "Enrico Battocchi"
146
  msgid "http://lopo.it"
147
  msgstr "http://lopo.it"
148
 
149
- #~ msgid "No page to duplicate has been supplied!"
150
- #~ msgstr "Non è stata fornita alcuna pagina da copiare!"
151
 
152
- #~ msgid "Make a duplicate from this post"
153
- #~ msgstr "Crea una copia di questo articolo"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
 
155
- #~ msgid "Make a duplicate from this page"
156
- #~ msgstr "Crea una copia di questa pagina"
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
- #~ msgid "Post creation failed, could not find original post:"
 
 
159
  #~ msgstr ""
160
- #~ "Creazione dell'articolo fallita, non è stato possibile trovare l'articolo "
161
- #~ "originale:"
 
6
  msgid ""
7
  msgstr ""
8
  "Project-Id-Version: duplicate-post\n"
9
+ "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10
+ "POT-Creation-Date: 2011-12-12 12:29+0000\n"
11
+ "PO-Revision-Date: 2011-12-12 13:13+0000\n"
12
+ "Last-Translator: Enrico Battocchi <Unknown>\n"
13
  "Language-Team: Italian <it@li.org>\n"
 
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
+ "X-Launchpad-Export-Date: 2011-12-12 13:36+0000\n"
18
+ "X-Generator: Launchpad (build 14458)\n"
19
 
20
+ #: duplicate-post-admin.php:68
21
+ msgid ""
22
+ "<strong>Duplicate Post</strong> now has two different ways to work: you can "
23
+ "clone immediately or you can copy to a new draft to edit.<br/>\n"
24
+ " Learn more on the <a href=\"%s\">plugin page</a>."
25
+ msgstr ""
26
+ "<strong>Duplicate Post</strong> adesso ha due diverse modalità di "
27
+ "funzionamento: si può clonare immediatamente o copiare in una nuova bozza "
28
+ "da modificare<br/>\n"
29
+ "Maggiori informazioni nella <a href=\"%s\">pagina del plugin</a>."
30
+
31
+ #: duplicate-post-admin.php:88
32
  msgid "Clone this item"
33
  msgstr "Clona questo elemento"
34
 
35
+ #: duplicate-post-admin.php:89
36
+ msgid "Clone"
37
+ msgstr "Clona"
38
 
39
+ #: duplicate-post-admin.php:91 duplicate-post-admin.php:110
40
+ #: duplicate-post-common.php:63 duplicate-post-common.php:67
41
  msgid "Copy to a new draft"
42
  msgstr "Copia in una nuova bozza"
43
 
44
+ #: duplicate-post-admin.php:92
45
+ msgid "New Draft"
46
+ msgstr "Nuova bozza"
47
+
48
+ #: duplicate-post-admin.php:137
49
  msgid "No post to duplicate has been supplied!"
50
  msgstr "Non è stato fornito alcun articolo da copiare!"
51
 
52
+ #: duplicate-post-admin.php:159
53
  msgid "Copy creation failed, could not find original:"
54
  msgstr "Creazione della copia fallita, impossibile trovare l'originale:"
55
 
56
+ #: duplicate-post-admin.php:309
57
  msgid "Donate"
58
  msgstr "Invia una donazione"
59
 
60
+ #: duplicate-post-admin.php:310
61
  msgid "Translate"
62
  msgstr "Traduci"
63
 
65
  msgid "Duplicate Post Options"
66
  msgstr "Opzioni di Duplicate Post"
67
 
68
+ #. #-#-#-#-# plugin.pot (Duplicate Post 2.0.2) #-#-#-#-#
69
  #. Plugin Name of the plugin/theme
70
+ #: duplicate-post-options.php:23 duplicate-post-options.php:30
 
71
  msgid "Duplicate Post"
72
  msgstr "Duplicate Post"
73
 
76
  msgstr "Copia anche la data dell'articolo o pagina"
77
 
78
  #: duplicate-post-options.php:42
79
+ msgid ""
80
+ "Normally, the new copy has its publication date set to current time: check "
81
+ "the box to copy the original post/page date"
82
+ msgstr ""
83
+ "Normalmente, la nuova copia ha la data di pubblicazione impostata "
84
+ "all'istante corrente: spunta la casella per copiare la data "
85
+ "dell'articolo/pagina originale"
86
 
87
  #: duplicate-post-options.php:47
88
  msgid "Copy post/page status"
89
  msgstr "Copia anche lo stato dell'articolo o della pagina"
90
 
91
  #: duplicate-post-options.php:50
92
+ msgid ""
93
+ "Copy the original post status (draft, published, pending) when cloning from "
94
+ "the post list."
95
+ msgstr ""
96
+ "Copia lo stato (bozza, pubblicato, in sospeso) dell'articolo originale "
97
+ "quando si clona dalla lista degli articoli"
98
 
99
  #: duplicate-post-options.php:55
100
  msgid "Copy excerpt"
109
  msgstr "Non copiare questi campi"
110
 
111
  #: duplicate-post-options.php:68
112
+ msgid "Comma-separated list of meta fields that must not be copied"
113
+ msgstr "Lista separata da virgole di campi personalizzati da non copiare"
114
 
115
  #: duplicate-post-options.php:73
116
  msgid "Do not copy these taxonomies"
125
  msgstr "Prefisso del titolo"
126
 
127
  #: duplicate-post-options.php:96
128
+ msgid ""
129
+ "Prefix to be added before the original title, e.g. \"Copy of\" (blank for no "
130
+ "prefix)"
131
+ msgstr ""
132
+ "Prefisso da aggiungere prima del titolo originale, es. \"Copia di\" "
133
+ "(lasciare vuoto per nessun prefisso)"
134
 
135
  #: duplicate-post-options.php:101
136
  msgid "Title suffix"
137
  msgstr "Suffisso del titolo"
138
 
139
  #: duplicate-post-options.php:105
140
+ msgid ""
141
+ "Suffix to be added after the original title, e.g. \"(dup)\" (blank for no "
142
+ "suffix)"
143
+ msgstr ""
144
+ "Suffisso da aggiungere prima del titolo originale, es. \"(copia)\" (lasciare "
145
+ "vuoto per nessun suffisso)"
146
 
147
  #: duplicate-post-options.php:110
148
  msgid "Minimum level to copy posts"
149
  msgstr "Livello minimo per copiare gli articoli"
150
 
151
  #: duplicate-post-options.php:129
152
+ msgid ""
153
+ "Warning: users will be able to copy all posts, even those of higher level "
154
+ "users"
155
+ msgstr ""
156
+ "Attenzione: gli utenti potranno copiare tutti gli articoli, anche quelli "
157
+ "degli utenti di livello superiore"
158
 
159
  #: duplicate-post-options.php:138
160
  msgid "Save Changes"
161
  msgstr "Salva le modifiche"
162
 
 
 
 
 
163
  #. Plugin URI of the plugin/theme
164
  msgid "http://lopo.it/duplicate-post-plugin/"
165
  msgstr "http://lopo.it/duplicate-post-plugin/"
166
 
167
  #. Description of the plugin/theme
168
+ msgid "Clone posts and pages."
169
+ msgstr "Clona articoli e pagine."
170
 
171
  #. Author of the plugin/theme
172
  msgid "Enrico Battocchi"
176
  msgid "http://lopo.it"
177
  msgstr "http://lopo.it"
178
 
179
+ #~ msgid "Duplicate"
180
+ #~ msgstr "Duplica"
181
 
182
+ #~ msgid ""
183
+ #~ "Comma-separated list of meta fields that must not be copied when cloning a "
184
+ #~ "post/page"
185
+ #~ msgstr ""
186
+ #~ "Lista separata da virgole di campi personalizzati da non copiare quando "
187
+ #~ "viene clonato un post o una pagina"
188
+
189
+ #~ msgid ""
190
+ #~ "Prefix to be added before the original title when cloning a post/page, e.g. "
191
+ #~ "\"Copy of\" (blank for no prefix)"
192
+ #~ msgstr ""
193
+ #~ "Prefisso da aggiungere prima del titolo originale quando si clona un post o "
194
+ #~ "una pagina, es. \"Copia di\" (lasciare vuoto per nessun prefisso)"
195
+
196
+ #~ msgid "Creates a copy of a post."
197
+ #~ msgstr "Crea una copia di un articolo."
198
 
199
+ #~ msgid ""
200
+ #~ "Normally, the new draft has publication date set to current time: check the "
201
+ #~ "box to copy the original post/page date"
202
+ #~ msgstr ""
203
+ #~ "Normalmente, la nuova bozza ha la data di pubblicazione impostata "
204
+ #~ "all'istante corrente: spunta la casella per copiare la data "
205
+ #~ "dell'articolo/pagina originale"
206
+
207
+ #~ msgid ""
208
+ #~ "Suffix to be added after the original title when cloning a post/page, e.g. "
209
+ #~ "\"(dup)\" (blank for no suffix)"
210
+ #~ msgstr ""
211
+ #~ "Suffisso da aggiungere prima del titolo originale quando si clona un post o "
212
+ #~ "una pagina, es. \"(copia)\" (lasciare vuoto per nessun suffisso)"
213
 
214
+ #~ msgid ""
215
+ #~ "Copy the original post status (draft, published, pending) when cloning from "
216
+ #~ "the post list. Cloning from the edit screen will always create a new draft."
217
  #~ msgstr ""
218
+ #~ "Copia lo stato dell'articolo originale (bozza, pubblicato, in sospeso) "
219
+ #~ "quando si clona dalla lista degli articoli. La duplicazione dalla schermata "
220
+ #~ "di modifica crerà sempre una nuova bozza."
languages/duplicate-post.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Duplicate Post package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Duplicate Post 2.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/duplicate-post\n"
7
- "POT-Creation-Date: 2011-12-08 14:06:45+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -12,31 +12,43 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: duplicate-post-admin.php:73 duplicate-post-common.php:67
 
 
 
 
 
 
 
16
  msgid "Clone this item"
17
  msgstr ""
18
 
19
- #: duplicate-post-admin.php:74
20
- msgid "Duplicate"
21
  msgstr ""
22
 
23
- #: duplicate-post-admin.php:92
 
24
  msgid "Copy to a new draft"
25
  msgstr ""
26
 
27
- #: duplicate-post-admin.php:119
 
 
 
 
28
  msgid "No post to duplicate has been supplied!"
29
  msgstr ""
30
 
31
- #: duplicate-post-admin.php:141
32
  msgid "Copy creation failed, could not find original:"
33
  msgstr ""
34
 
35
- #: duplicate-post-admin.php:289
36
  msgid "Donate"
37
  msgstr ""
38
 
39
- #: duplicate-post-admin.php:290
40
  msgid "Translate"
41
  msgstr ""
42
 
@@ -44,7 +56,7 @@ msgstr ""
44
  msgid "Duplicate Post Options"
45
  msgstr ""
46
 
47
- #. #-#-#-#-# plugin.pot (Duplicate Post 2.0) #-#-#-#-#
48
  #. Plugin Name of the plugin/theme
49
  #: duplicate-post-options.php:23 duplicate-post-options.php:30
50
  msgid "Duplicate Post"
@@ -56,8 +68,8 @@ msgstr ""
56
 
57
  #: duplicate-post-options.php:42
58
  msgid ""
59
- "Normally, the new draft has publication date set to current time: check the "
60
- "box to copy the original post/page date"
61
  msgstr ""
62
 
63
  #: duplicate-post-options.php:47
@@ -67,7 +79,7 @@ msgstr ""
67
  #: duplicate-post-options.php:50
68
  msgid ""
69
  "Copy the original post status (draft, published, pending) when cloning from "
70
- "the post list. Cloning from the edit screen will always create a new draft."
71
  msgstr ""
72
 
73
  #: duplicate-post-options.php:55
@@ -83,9 +95,7 @@ msgid "Do not copy these fields"
83
  msgstr ""
84
 
85
  #: duplicate-post-options.php:68
86
- msgid ""
87
- "Comma-separated list of meta fields that must not be copied when cloning a "
88
- "post/page"
89
  msgstr ""
90
 
91
  #: duplicate-post-options.php:73
@@ -102,8 +112,8 @@ msgstr ""
102
 
103
  #: duplicate-post-options.php:96
104
  msgid ""
105
- "Prefix to be added before the original title when cloning a post/page, e.g. "
106
- "\"Copy of\" (blank for no prefix)"
107
  msgstr ""
108
 
109
  #: duplicate-post-options.php:101
@@ -112,8 +122,8 @@ msgstr ""
112
 
113
  #: duplicate-post-options.php:105
114
  msgid ""
115
- "Suffix to be added after the original title when cloning a post/page, e.g. "
116
- "\"(dup)\" (blank for no suffix)"
117
  msgstr ""
118
 
119
  #: duplicate-post-options.php:110
@@ -130,16 +140,12 @@ msgstr ""
130
  msgid "Save Changes"
131
  msgstr ""
132
 
133
- #: duplicate-post-common.php:63
134
- msgid "Clone"
135
- msgstr ""
136
-
137
  #. Plugin URI of the plugin/theme
138
  msgid "http://lopo.it/duplicate-post-plugin/"
139
  msgstr ""
140
 
141
  #. Description of the plugin/theme
142
- msgid "Creates a copy of a post."
143
  msgstr ""
144
 
145
  #. Author of the plugin/theme
2
  # This file is distributed under the same license as the Duplicate Post package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Duplicate Post 2.0.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/duplicate-post\n"
7
+ "POT-Creation-Date: 2011-12-12 12:29:18+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: duplicate-post-admin.php:68
16
+ msgid ""
17
+ "<strong>Duplicate Post</strong> now has two different ways to work: you can "
18
+ "clone immediately or you can copy to a new draft to edit.<br/>\n"
19
+ " Learn more on the <a href=\"%s\">plugin page</a>."
20
+ msgstr ""
21
+
22
+ #: duplicate-post-admin.php:88
23
  msgid "Clone this item"
24
  msgstr ""
25
 
26
+ #: duplicate-post-admin.php:89
27
+ msgid "Clone"
28
  msgstr ""
29
 
30
+ #: duplicate-post-admin.php:91 duplicate-post-admin.php:110
31
+ #: duplicate-post-common.php:63 duplicate-post-common.php:67
32
  msgid "Copy to a new draft"
33
  msgstr ""
34
 
35
+ #: duplicate-post-admin.php:92
36
+ msgid "New Draft"
37
+ msgstr ""
38
+
39
+ #: duplicate-post-admin.php:137
40
  msgid "No post to duplicate has been supplied!"
41
  msgstr ""
42
 
43
+ #: duplicate-post-admin.php:159
44
  msgid "Copy creation failed, could not find original:"
45
  msgstr ""
46
 
47
+ #: duplicate-post-admin.php:309
48
  msgid "Donate"
49
  msgstr ""
50
 
51
+ #: duplicate-post-admin.php:310
52
  msgid "Translate"
53
  msgstr ""
54
 
56
  msgid "Duplicate Post Options"
57
  msgstr ""
58
 
59
+ #. #-#-#-#-# plugin.pot (Duplicate Post 2.0.2) #-#-#-#-#
60
  #. Plugin Name of the plugin/theme
61
  #: duplicate-post-options.php:23 duplicate-post-options.php:30
62
  msgid "Duplicate Post"
68
 
69
  #: duplicate-post-options.php:42
70
  msgid ""
71
+ "Normally, the new copy has its publication date set to current time: check "
72
+ "the box to copy the original post/page date"
73
  msgstr ""
74
 
75
  #: duplicate-post-options.php:47
79
  #: duplicate-post-options.php:50
80
  msgid ""
81
  "Copy the original post status (draft, published, pending) when cloning from "
82
+ "the post list."
83
  msgstr ""
84
 
85
  #: duplicate-post-options.php:55
95
  msgstr ""
96
 
97
  #: duplicate-post-options.php:68
98
+ msgid "Comma-separated list of meta fields that must not be copied"
 
 
99
  msgstr ""
100
 
101
  #: duplicate-post-options.php:73
112
 
113
  #: duplicate-post-options.php:96
114
  msgid ""
115
+ "Prefix to be added before the original title, e.g. \"Copy of\" (blank for no "
116
+ "prefix)"
117
  msgstr ""
118
 
119
  #: duplicate-post-options.php:101
122
 
123
  #: duplicate-post-options.php:105
124
  msgid ""
125
+ "Suffix to be added after the original title, e.g. \"(dup)\" (blank for no "
126
+ "suffix)"
127
  msgstr ""
128
 
129
  #: duplicate-post-options.php:110
140
  msgid "Save Changes"
141
  msgstr ""
142
 
 
 
 
 
143
  #. Plugin URI of the plugin/theme
144
  msgid "http://lopo.it/duplicate-post-plugin/"
145
  msgstr ""
146
 
147
  #. Description of the plugin/theme
148
+ msgid "Clone posts and pages."
149
  msgstr ""
150
 
151
  #. Author of the plugin/theme
readme.txt CHANGED
@@ -4,41 +4,43 @@ 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
7
- Stable tag: 2.0.1
8
 
9
  Clone posts and pages.
10
 
11
  == Description ==
12
 
13
- This plugin allows to create a copy of a post (or page) in two ways.
14
 
15
- 1. In 'Edit Posts'/'Edit Pages', you can click on 'Duplicate' link below the post/page title: this will immediately create a copy and return to the list.
16
 
17
- 2. While editing a post/page, you can click on 'Copy to a new draft' above "Cancel"/"Move to trash". This will lead to the edit page for the new draft: change what you want, click on 'Publish' and you're done.
 
 
 
 
18
 
19
  **Pay attention to the new behaviour!** The first way now allows you to clone a post with a single click, speeding up your work if you have many posts to duplicate.
20
 
21
  There is also a **template tag**, so you can put it in your templates and clone your posts/pages from the front-end. Clicking on the link will lead you to the edit page for the new draft, just like the second way above.
22
 
23
- In the Options page under Settings it is now possible to choose:
24
 
25
- * if the original post/page date must be copied too
26
- * if the original post/page status (draft, published, pending) must be copied too when cloning from the post list
27
- * if the original post/page excerpt must be copied too
28
- * which taxonomies and custom fields must not be copied
29
- * a prefix (or a suffix) to place before (or after) the title of the cloned post/page
30
- * the minimum user level to clone posts or pages.
31
 
32
  Duplicate post is natively in English, but it's shipped with translations in several other languages (though some are incomplete). Now there is a [Launchpad translation project](https://translations.launchpad.net/duplicate-post/) available to help translating this plugin: feel free to contribute (you can also send me an e-mail using the form on my website).
33
 
34
  **If you're a plugin developer**, I suggest to read the section made just for you under "Other Notes", to ensure compatibility between your plugin(s) and mine!
35
 
36
- The plugin has been tested against versions 3.0 -> 3.3. It's not yet been tested with the multiblog feature active (but it used to work with WPMU).
37
 
38
  Thanks for all the suggestions, bug reports, translations and donations, they're frankly too many to be listed here!
39
 
40
- Credit must be given to the (great) [Post Template](http://post-templates.vincentprat.info) plugin by Vincent Prat: I made this by hacking his work to get something more focused to a sporadic use, without the need to create and manage templates just to make simple copies of some posts every now and then. If my plugin doesn't fits your needs (and even if it does) check Vincent's.
41
-
42
  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.
43
  The website is http://www.kino-desse.org and the cinema is located in Livorno, Italy.
44
 
@@ -52,14 +54,9 @@ Use WordPress' Add New Plugin feature, searching "Duplicate Post", or download t
52
 
53
  == Frequently Asked Questions ==
54
 
55
- = When I click "Duplicate" in the Posts list, I'm not redirected to the edit screen anymore! Is it a bug? =
56
-
57
- No, it's a new feature. A lot of users found the usual behaviour of the plugin too complicated when they had a large number of posts to clone, and they were right.
58
- Check the description to learn how the plugin behaves now.
59
-
60
  = The plugin doesn't work, why? =
61
 
62
- First, check your version of WordPress: the plugin is not supposed to work anymore on old versions.
63
 
64
  Then try to deactivate and re-activate it, some user have reported that this fixes the problem.
65
 
@@ -74,12 +71,15 @@ There is an open ticket in WordPress Trac, as other plugin developers too are in
74
  == Screenshots ==
75
 
76
  1. Here you can copy the post you're editing to a new draft.
77
- 2. By clicking on "Duplicate" the post is cloned immediately.
78
  3. The options page.
79
- 4. The template tag manually added to Twenty Ten theme. Click on the "Clone" link and you're redirected to the edit screen for a new draft copy of your post.
80
 
81
  == Upgrade Notice ==
82
 
 
 
 
83
  = 2.0.1 =
84
  Bug fix + new option
85
 
@@ -94,6 +94,11 @@ New features and customization, WP 3.0 compatibility: you should upgrade if you
94
 
95
  == Changelog ==
96
 
 
 
 
 
 
97
  = 2.0.1 =
98
  * Fixed bug for action filters
99
  * New option so you can choose if cloning from the posts list must copy the post status (draft, published, pending) too.
@@ -186,7 +191,7 @@ Please refer to the [Plugin API](http://codex.wordpress.org/Plugin_API) for ever
186
 
187
  If you find this useful and you if you want to contribute, there are three ways:
188
 
189
- 1. You can [write me](http://www.lopo.it/contatti/) and submit your bug reports, suggestions and requests for features;
190
- 2. If you want to translate it to your language (there are just a few lines of text), you can use the [Launchpad translation project](https://translations.launchpad.net/duplicate-post/), or [contact me](http://www.lopo.it/contatti/) and I’ll send you the .pot catalogue; your translation could be featured in next releases;
191
- 3. Using the plugin is free, but if you want you can send me some bucks with PayPal [here](http://www.lopo.it/duplicate-post-plugin/)
192
 
4
  Tags: duplicate post, copy, clone
5
  Requires at least: 3.0
6
  Tested up to: 3.3
7
+ Stable tag: 2.0.2
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
 
17
+ 2. In 'Edit Posts'/'Edit Pages', you can click on 'New Draft' link below the post/page title.
18
+
19
+ 3. On the post edit screen, you can click on 'Copy to a new draft' above "Cancel"/"Move to trash".
20
+
21
+ 2 and 3 will lead to the edit page for the new draft: change what you want, click on 'Publish' and you're done.
22
 
23
  **Pay attention to the new behaviour!** The first way now allows you to clone a post with a single click, speeding up your work if you have many posts to duplicate.
24
 
25
  There is also a **template tag**, so you can put it in your templates and clone your posts/pages from the front-end. Clicking on the link will lead you to the edit page for the new draft, just like the second way above.
26
 
27
+ In the Options page under Settings it is now possible to choose what to copy:
28
 
29
+ * the original post/page date
30
+ * the original post/page status (draft, published, pending), when cloning from the posts list.
31
+ * the original post/page excerpt
32
+ * which taxonomies and custom fields
33
+
34
+ You can also set a prefix (or a suffix) to place before (or after) the title of the cloned post/page, and the minimum user level to clone posts or pages.
35
 
36
  Duplicate post is natively in English, but it's shipped with translations in several other languages (though some are incomplete). Now there is a [Launchpad translation project](https://translations.launchpad.net/duplicate-post/) available to help translating this plugin: feel free to contribute (you can also send me an e-mail using the form on my website).
37
 
38
  **If you're a plugin developer**, I suggest to read the section made just for you under "Other Notes", to ensure compatibility between your plugin(s) and mine!
39
 
40
+ The plugin has been tested against versions 3.0 -> 3.3, both in single site and network mode.
41
 
42
  Thanks for all the suggestions, bug reports, translations and donations, they're frankly too many to be listed here!
43
 
 
 
44
  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.
45
  The website is http://www.kino-desse.org and the cinema is located in Livorno, Italy.
46
 
54
 
55
  == Frequently Asked Questions ==
56
 
 
 
 
 
 
57
  = The plugin doesn't work, why? =
58
 
59
+ First, check your version of WordPress: the plugin is not supposed to work on old versions anymore.
60
 
61
  Then try to deactivate and re-activate it, some user have reported that this fixes the problem.
62
 
71
  == Screenshots ==
72
 
73
  1. Here you can copy the post you're editing to a new draft.
74
+ 2. By clicking on "Clone" the post is cloned immediately. "New draft" leads to the edit screen.
75
  3. The options page.
76
+ 4. The template tag manually added to Twenty Ten theme. Click on the "Copy to a new draft" link and you're redirected to the edit screen for a new draft copy of your post.
77
 
78
  == Upgrade Notice ==
79
 
80
+ = 2.0.2 =
81
+ Fixed permalink bug + double choice on posts list
82
+
83
  = 2.0.1 =
84
  Bug fix + new option
85
 
94
 
95
  == Changelog ==
96
 
97
+ = 2.0.2 =
98
+ * Fixed bug for permalinks
99
+ * Two links on posts list: clone immediately or copy to a new draft to edit.
100
+ * Tested on multisite mode.
101
+
102
  = 2.0.1 =
103
  * Fixed bug for action filters
104
  * New option so you can choose if cloning from the posts list must copy the post status (draft, published, pending) too.
191
 
192
  If you find this useful and you if you want to contribute, there are three ways:
193
 
194
+ 1. You can [write me](http://lopo.it/contatti/) and submit your bug reports, suggestions and requests for features;
195
+ 2. If you want to translate it to your language (there are just a few lines of text), you can use the [Launchpad translation project](https://translations.launchpad.net/duplicate-post/), or [contact me](http://lopo.it/contatti/) and I’ll send you the .pot catalogue; your translation could be featured in next releases;
196
+ 3. Using the plugin is free, but if you want you can send me some bucks with PayPal [here](http://lopo.it/duplicate-post-plugin/)
197
 
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file