Version Description
Release Date: June 28th, 2022
Enhancements:
- Improves the impact of the plugin on the performance of the site by avoiding useless calls on the
gettext
filter.
Bugfixes:
- Fixes a bug where a section in the Classic Editor's submitbox would be displayed with incorrect margins.
Other:
- Sets the WordPress tested up to version to 6.0.
Download this release
Release Info
Developer | Yoast |
Plugin | Duplicate Post |
Version | 4.5 |
Comparing to | |
See all releases |
Code changes from version 4.4 to 4.5
- duplicate-post.php +3 -3
- js/dist/{duplicate-post-edit-440.js → duplicate-post-edit-450.js} +0 -0
- js/dist/{duplicate-post-elementor-440.js → duplicate-post-elementor-450.js} +0 -0
- js/dist/{duplicate-post-options-440.js → duplicate-post-options-450.js} +0 -0
- js/dist/{duplicate-post-quick-edit-440.js → duplicate-post-quick-edit-450.js} +0 -0
- js/dist/{duplicate-post-strings-440.js → duplicate-post-strings-450.js} +0 -0
- readme.txt +17 -333
- src/ui/classic-editor.php +35 -15
- src/ui/newsletter.php +2 -2
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.php +2 -2
duplicate-post.php
CHANGED
@@ -9,12 +9,12 @@
|
|
9 |
* Plugin Name: Yoast Duplicate Post
|
10 |
* Plugin URI: https://yoast.com/wordpress/plugins/duplicate-post/
|
11 |
* Description: The go-to tool for cloning posts and pages, including the powerful Rewrite & Republish feature.
|
12 |
-
* Version: 4.
|
13 |
* Author: Enrico Battocchi & Team Yoast
|
14 |
* Author URI: https://yoast.com
|
15 |
* Text Domain: duplicate-post
|
16 |
*
|
17 |
-
* Copyright 2020 Yoast BV (email : info@yoast.com)
|
18 |
*
|
19 |
* This program is free software; you can redistribute it and/or modify
|
20 |
* it under the terms of the GNU General Public License as published by
|
@@ -45,7 +45,7 @@ if ( ! defined( 'DUPLICATE_POST_PATH' ) ) {
|
|
45 |
define( 'DUPLICATE_POST_PATH', plugin_dir_path( __FILE__ ) );
|
46 |
}
|
47 |
|
48 |
-
define( 'DUPLICATE_POST_CURRENT_VERSION', '4.
|
49 |
|
50 |
$duplicate_post_autoload_file = DUPLICATE_POST_PATH . 'vendor/autoload.php';
|
51 |
|
9 |
* Plugin Name: Yoast Duplicate Post
|
10 |
* Plugin URI: https://yoast.com/wordpress/plugins/duplicate-post/
|
11 |
* Description: The go-to tool for cloning posts and pages, including the powerful Rewrite & Republish feature.
|
12 |
+
* Version: 4.5
|
13 |
* Author: Enrico Battocchi & Team Yoast
|
14 |
* Author URI: https://yoast.com
|
15 |
* Text Domain: duplicate-post
|
16 |
*
|
17 |
+
* Copyright 2020-2022 Yoast BV (email : info@yoast.com)
|
18 |
*
|
19 |
* This program is free software; you can redistribute it and/or modify
|
20 |
* it under the terms of the GNU General Public License as published by
|
45 |
define( 'DUPLICATE_POST_PATH', plugin_dir_path( __FILE__ ) );
|
46 |
}
|
47 |
|
48 |
+
define( 'DUPLICATE_POST_CURRENT_VERSION', '4.5' );
|
49 |
|
50 |
$duplicate_post_autoload_file = DUPLICATE_POST_PATH . 'vendor/autoload.php';
|
51 |
|
js/dist/{duplicate-post-edit-440.js → duplicate-post-edit-450.js}
RENAMED
File without changes
|
js/dist/{duplicate-post-elementor-440.js → duplicate-post-elementor-450.js}
RENAMED
File without changes
|
js/dist/{duplicate-post-options-440.js → duplicate-post-options-450.js}
RENAMED
File without changes
|
js/dist/{duplicate-post-quick-edit-440.js → duplicate-post-quick-edit-450.js}
RENAMED
File without changes
|
js/dist/{duplicate-post-strings-440.js → duplicate-post-strings-450.js}
RENAMED
File without changes
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: yoast, lopo
|
3 |
Donate link: https://yoast.com/wordpress/plugins/duplicate-post/
|
4 |
Tags: duplicate post, copy, clone
|
5 |
-
Requires at least: 5.
|
6 |
-
Tested up to: 6.
|
7 |
-
Stable tag: 4.
|
8 |
Requires PHP: 5.6.20
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -69,358 +69,42 @@ If Duplicate Post is still in English, or if there are some untranslated strings
|
|
69 |
5. Bulk actions.
|
70 |
6. The options page.
|
71 |
|
72 |
-
== Upgrade Notice ==
|
73 |
-
|
74 |
-
= 3.2.6 =
|
75 |
-
Compatibility with WP 5.5 + various fixes
|
76 |
-
|
77 |
-
= 3.2.5 =
|
78 |
-
First release from Yoast + accessibility improvements + filter deprecated
|
79 |
-
|
80 |
-
= 3.2.4 =
|
81 |
-
Options to show original post + accessibility improvements
|
82 |
-
|
83 |
-
= 3.2.3 =
|
84 |
-
Fixes some bugs and incompatibilities with CF7, WPML, and custom post types with custom capabilities
|
85 |
-
|
86 |
-
= 3.2.2 =
|
87 |
-
Adds compatibility with Gutenberg UI and fixes a problem with slugs on new installs
|
88 |
-
|
89 |
-
= 3.2.1 =
|
90 |
-
Fixes some problems with Multisite, WPML, revisions
|
91 |
-
|
92 |
-
= 3.2 =
|
93 |
-
new website + WPML compatibility + various fixes
|
94 |
-
|
95 |
-
= 3.1.2 =
|
96 |
-
Fixes the problem with custom fields
|
97 |
-
|
98 |
-
= 3.1.1 =
|
99 |
-
Bulk clone + custom field wildcards + other features + bugfixes + fix for nasty nag
|
100 |
-
|
101 |
-
= 3.1 =
|
102 |
-
Bulk clone + custom field wildcards + other features + bugfixes
|
103 |
-
|
104 |
-
= 3.0.3 =
|
105 |
-
Notices + small fixes and improvements
|
106 |
-
|
107 |
-
= 3.0.2 =
|
108 |
-
Small bugfixes: check the changelog for more info
|
109 |
-
|
110 |
-
= 3.0.1 =
|
111 |
-
Recommended if you have 3.0: fixes the upgrade bug
|
112 |
-
|
113 |
-
= 3.0 =
|
114 |
-
Major redesign of the settings page + fine-tune options (what to copy, custom post types, etc.) + bugfixes and XSS prevention
|
115 |
-
|
116 |
-
= 2.6 =
|
117 |
-
PHP 5.4 (Strict Standards) compatible + Fixed possible XSS and SQL injections + other bugs
|
118 |
-
|
119 |
-
= 2.4.1 =
|
120 |
-
Fixes a couple of bug. Recommended if you have problems with v2.4
|
121 |
-
|
122 |
-
= 2.4 =
|
123 |
-
Copy child pages + a couple of bugfixes + licence switch to GPLv2
|
124 |
-
|
125 |
-
= 2.3 =
|
126 |
-
Fixes a bunch of bugs + copy attachments + choose where to show the links.
|
127 |
-
|
128 |
-
= 2.2 =
|
129 |
-
VERY IMPORTANT UPGRADE to get rid of problems with complex custom fields, afflicting both 2.1.* releases.
|
130 |
-
|
131 |
-
= 2.1.1 =
|
132 |
-
Fix for upgrade problem
|
133 |
-
|
134 |
-
= 2.1 =
|
135 |
-
Copy from admin bar + user levels out, roles and capabilities in.
|
136 |
-
|
137 |
-
= 2.0.2 =
|
138 |
-
Fixed permalink bug + double choice on posts list
|
139 |
-
|
140 |
-
= 2.0.1 =
|
141 |
-
Bug fix + new option
|
142 |
-
|
143 |
-
= 2.0 =
|
144 |
-
Several improvements and new features, see changelog. Requires WP 3.0+.
|
145 |
-
|
146 |
-
= 1.1.1 =
|
147 |
-
Some users have experienced a fatal error when upgrading to v1.1: this may fix it, if it's caused by a plugin conflict.
|
148 |
-
|
149 |
-
= 1.1 =
|
150 |
-
New features and customization, WP 3.0 compatibility: you should upgrade if you want to copy Custom Posts with Custom Taxonomies.
|
151 |
-
|
152 |
== Changelog ==
|
153 |
|
154 |
-
= 4.
|
|
|
155 |
|
156 |
Enhancements:
|
157 |
|
158 |
-
*
|
159 |
|
160 |
Bugfixes:
|
161 |
|
162 |
-
* Fixes a bug where
|
163 |
-
* Fixes a bug where the button style would be broken in the Classic Editor.
|
164 |
-
* Fixes a bug where a fatal error would be triggered in the Widgets page in combination with some themes or plugins.
|
165 |
|
166 |
Other:
|
167 |
-
* Sets the WordPress tested up to version to 5.9.
|
168 |
-
|
169 |
-
= 4.3 (2021-12-14) =
|
170 |
-
|
171 |
-
Bugfixes:
|
172 |
|
173 |
-
*
|
174 |
|
175 |
-
= 4.
|
176 |
-
|
177 |
-
Bugfixes:
|
178 |
-
|
179 |
-
* Fixes a bug where some strings where not translated.
|
180 |
-
* Fixes a bug where meta data went missing for duplicate posts created by the Rewrite & Republish feature. Props to [ocean90](https://github.com/ocean90).
|
181 |
-
* Fixes a bug where the plugin would not initialize if installed via composer.
|
182 |
-
|
183 |
-
Other:
|
184 |
-
|
185 |
-
* Replaces Mailchimp with MailBlue newsletter integration.
|
186 |
-
* Improved compatibility for PHP 8.0.
|
187 |
-
* Improved sort order of the taxonomies list on the options page.
|
188 |
-
* Most plugin files have been renamed. If you extend this plugin of include any of the files from the plugin from within your own plugin, you may need to adjust the file name used in the `include`/`require` statement.
|
189 |
-
|
190 |
-
= 4.1.2 (2021-03-23) =
|
191 |
-
|
192 |
-
Enhancements:
|
193 |
-
|
194 |
-
* Allows plugins such as ACF to add fields to the "Compare changes" screen for Rewrite & Republish.
|
195 |
-
|
196 |
-
Bugfixes:
|
197 |
-
|
198 |
-
* Fixes a bug where the "Compare changes" screen for the Rewrite & Republish feature displayed a broken layout in WordPress 5.7.
|
199 |
-
* Fixes a bug where a post type enabled by filter couldn't be copied.
|
200 |
-
* Fixes a bug where the "Show links in" settings were reset to the default value on version upgrade.
|
201 |
-
|
202 |
-
= 4.1.1 (2021-01-27) =
|
203 |
-
|
204 |
-
Bugfixes:
|
205 |
-
|
206 |
-
* Fixes a bug where editing posts with Elementor could trigger a fatal error.
|
207 |
-
|
208 |
-
= 4.1 (2021-01-27) =
|
209 |
|
210 |
Enhancements:
|
211 |
|
212 |
-
*
|
213 |
|
214 |
Bugfixes:
|
215 |
|
216 |
-
* Fixes a bug where
|
217 |
-
* Fixes a bug where the
|
|
|
218 |
|
219 |
Other:
|
220 |
|
221 |
-
*
|
222 |
-
|
223 |
-
= 4.0.2 (2021-01-14) =
|
224 |
-
|
225 |
-
Bugfixes:
|
226 |
-
|
227 |
-
* Fixes a bug where errors or notices could be triggered when using the plugin with some other plugins or custom code.
|
228 |
-
|
229 |
-
= 4.0.1 (2021-01-12) =
|
230 |
-
|
231 |
-
Bugfixes:
|
232 |
-
|
233 |
-
* Fixes a bug that caused a fatal error when used with some plugins.
|
234 |
-
|
235 |
-
= 4.0 (2021-01-12) =
|
236 |
-
|
237 |
-
Enhancements:
|
238 |
|
239 |
-
|
240 |
-
|
241 |
-
* Introduces new settings to individually enable/disable the `New Draft`, `Clone` and `Rewrite & Republish` links.
|
242 |
-
|
243 |
-
= 3.2.6 (2020-09-17) =
|
244 |
-
* Compatibility with WordPress 5.5
|
245 |
-
* Fixed bug about copying comments in WordPress 5.5
|
246 |
-
* Check user permission when adding option to the bulk actions dropdown list
|
247 |
-
* Improved update notice to be displayed only on selected screens when updating from < 3.2.5
|
248 |
-
* Updated template tag documentation link
|
249 |
-
* Added missing gettext to "Subscribe" button
|
250 |
-
|
251 |
-
= 3.2.5 (2020-07-07) =
|
252 |
-
* First release from Yoast
|
253 |
-
* Accessibility improvements to the settings page
|
254 |
-
* Accessibility improvements to the "Show original item" metabox
|
255 |
-
* Accessibility improvements to the "Show original item" check box in Quick Edit
|
256 |
-
* duplicate_post_blacklist_filter deprecated in favor of duplicate_post_excludelist_filter
|
257 |
-
|
258 |
-
= 3.2.4 (2019-12-10) =
|
259 |
-
* Options to show original item in post list (in a column or alongside post states) or in a metabox in the edit screen
|
260 |
-
* Accessibility improvements
|
261 |
-
* Small other fixes
|
262 |
-
|
263 |
-
= 3.2.3 (2019-07-10) =
|
264 |
-
* Fixes incompatibility with previous versions of CF7
|
265 |
-
* Now roles without edit_posts capability but having equivalent capability for custom post types can be allowed to copy
|
266 |
-
* Small other fixes to bugs that could lead to incompatibilities with WPML and others
|
267 |
-
|
268 |
-
= 3.2.2 (2018-04-13) =
|
269 |
-
* The "Admin bar" option shows the link in the post edit screen too, so you can use the plugin with Gutenberg enabled
|
270 |
-
* Option for "Slug" not set by default on new installations
|
271 |
-
* Better display of icon in the Admin bar on small screens
|
272 |
-
|
273 |
-
= 3.2.1 (2017-11-25) =
|
274 |
-
* Fixing some issues of the 3.* trunk before major redesign
|
275 |
-
* Fixes issue when upgrading on multisite
|
276 |
-
* Improved compatibility with WPML + page builders, thanks to WPML team
|
277 |
-
* Prevents creating a revision immediately after the cloning
|
278 |
-
|
279 |
-
= 3.2 (2017-04-04) =
|
280 |
-
* new website with extensive documentation
|
281 |
-
* WPML compatibility, thanks to WPML team
|
282 |
-
* improved Jetpack compatibility (Subscriptions, Markdown)
|
283 |
-
* small changes to hooks
|
284 |
-
* improved security with nonces
|
285 |
-
* various small fixes
|
286 |
-
|
287 |
-
= 3.1.2 (2016-12-13) =
|
288 |
-
* Fix for custom fields not copied
|
289 |
-
|
290 |
-
= 3.1.1 (2016-12-13) =
|
291 |
-
* Fix for nasty update nag (plus a failsafe checkbox)
|
292 |
-
|
293 |
-
= 3.1 (2016-12-13) =
|
294 |
-
* Bulk clone action added (WP 4.7+)
|
295 |
-
* Wildcards enabled for custom fields to skip
|
296 |
-
* Options to copy post author, post format (moved from taxonomies), menu order, post template
|
297 |
-
* Check publish_posts/publish_pages capability to prevent Contributors from publishing by cloning
|
298 |
-
* Using wp_slash (WP 3.6+) or a better workaround (WP 4.4+) on the post and its meta, should also fix some compatibility issues
|
299 |
-
* Check if admin bar is showing before enqueueing CSS
|
300 |
-
* Probable fix for repeated clone bug
|
301 |
-
* Other minor bugs fixed
|
302 |
-
|
303 |
-
= 3.0.3 (2016-10-29) =
|
304 |
-
* Notices in admin after copying
|
305 |
-
* Fixes warning in custom post type archives
|
306 |
-
* Uses site options for version and notice
|
307 |
-
* Minor fixes
|
308 |
-
|
309 |
-
= 3.0.2 (2016-10-18) =
|
310 |
-
* Can now be enabled for every custom post type with visible UI (not just public ones)
|
311 |
-
* Admin bar CSS only enqueued when needed
|
312 |
-
* New "Donate" button
|
313 |
-
* Fixes for minor bugs and typos
|
314 |
-
|
315 |
-
= 3.0.1 (2016-10-09) =
|
316 |
-
* Fixes the issues for people upgrading from an older version
|
317 |
-
|
318 |
-
= 3.0 (2016-10-09) =
|
319 |
-
* Settings page redesigned
|
320 |
-
* More options to enable/disable copy of every part of a post
|
321 |
-
* Enable/disable cloning for every custom post type
|
322 |
-
* Jetpack Publicize compatibility
|
323 |
-
* Fixed a possible XSS
|
324 |
-
* Fixed other little bugs
|
325 |
-
* Translations removed to use WP.org's official translation project
|
326 |
-
* Checked PHP 7 compatibility
|
327 |
-
|
328 |
-
= 2.6 (2014-04-27) =
|
329 |
-
* PHP 5.4 (Strict Standards) compatible
|
330 |
-
* Fixed possible XSS and SQL injections
|
331 |
-
* other bugs
|
332 |
-
* Updated and added translations
|
333 |
-
* Tested up to WP 3.8.1
|
334 |
-
|
335 |
-
= 2.4.1 (2014-02-22) =
|
336 |
-
* Fixed regression about draft permalinks
|
337 |
-
* Fixed bug with guid
|
338 |
-
* Don't clone to_ping and pinged (maybe there will be an option about those later)
|
339 |
-
|
340 |
-
= 2.4 (2012-04-29) =
|
341 |
-
* New option to clone the children of the original page
|
342 |
-
* Licence changed to GPLv2 or later
|
343 |
-
* Fixed publishing dates for drafts
|
344 |
-
* Fixed bug with prefix/suffix
|
345 |
-
* Translation project moved to GlotPress
|
346 |
-
|
347 |
-
= 2.3 (2012-04-06) =
|
348 |
-
* Added options to choose where to show the "Clone" links
|
349 |
-
* Clone attachments (i.e. references in the DB, not physical files)
|
350 |
-
* Fix for untranslated user roles
|
351 |
-
* Some other fixes (missing checks, PHP warnings and errors, etc.)
|
352 |
-
|
353 |
-
= 2.2 (2012-02-01) =
|
354 |
-
* Fix for problems when copying serialized meta fields
|
355 |
-
* Fix for multiple _dp_original field
|
356 |
-
* Removed deprecated parameter when adding options
|
357 |
-
|
358 |
-
= 2.1.1 (2012-01-04) =
|
359 |
-
* Can't rely on activation hook for upgrade, this caused problems with new options
|
360 |
-
|
361 |
-
= 2.1 (2012-01-03) =
|
362 |
-
* Even more code cleaning (no more custom queries, using WP API)
|
363 |
-
* Term order preserved when copying
|
364 |
-
* Stopped using deprecated User levels, now it uses Roles and Capabilities
|
365 |
-
* 'Copy to a new draft' link in admin bar
|
366 |
-
* duplicate_post_get_original template tag
|
367 |
-
* Settings link in plugin list, 'Donate' and 'Translate' link in option page
|
368 |
-
|
369 |
-
= 2.0.2 (2011-12-12) =
|
370 |
-
* Fixed bug for permalinks
|
371 |
-
* Two links on posts list: clone immediately or copy to a new draft to edit.
|
372 |
-
* Tested on multisite mode.
|
373 |
-
|
374 |
-
= 2.0.1 (2011-12-08) =
|
375 |
-
* Fixed bug for action filters
|
376 |
-
* New option so you can choose if cloning from the posts list must copy the post status (draft, published, pending) too.
|
377 |
-
|
378 |
-
= 2.0 (2011-12-08) =
|
379 |
-
* WP 3.3 compatibility (still not tested against multiblog feature, so beware)
|
380 |
-
* Minimum WP version: 3.0
|
381 |
-
* Code cleanup
|
382 |
-
* Immediate cloning from post list
|
383 |
-
* Added options for taxonomies and post excerpt
|
384 |
-
* Added suffix option
|
385 |
-
* Added template tag
|
386 |
-
|
387 |
-
= 1.1.2 (2011-04-08) =
|
388 |
-
* WP 3.1.1 compatibility (still not tested against multiblog feature, so beware)
|
389 |
-
* Added complete Polish language files
|
390 |
-
|
391 |
-
= 1.1.1 (2010-06-30) =
|
392 |
-
* Plugin split in two files for faster opening in Plugins list page
|
393 |
-
* fix conflicts with a few other plugins
|
394 |
-
* Added Dutch language files
|
395 |
-
|
396 |
-
= 1.1 (2010-06-24) =
|
397 |
-
* WP 3.0 compatibility (not tested against multiblog feature, so beware)
|
398 |
-
* Option page: minimum user level, title prefix, fields not to be copied, copy post/page date also
|
399 |
-
* Added German, Swedish, Romanian, Hebrew, Catalan (incomplete) and Polish (incomplete) language files
|
400 |
-
|
401 |
-
= 1.0 (2010-06-15) =
|
402 |
-
* Better integration with WP 2.7+ interface
|
403 |
-
* Added actions for plugins which store post metadata in self-managed tables
|
404 |
-
* Added French and Spanish language files
|
405 |
-
* Dropped WP 2.6.5 compatibility
|
406 |
-
|
407 |
-
= 0.6.1 (2009-12-03) =
|
408 |
-
* Tested WP 2.9 compatibility
|
409 |
-
|
410 |
-
= 0.6 (2007-07-21) =
|
411 |
-
* Fix for WP 2.8.1
|
412 |
-
* WPMU compatibility
|
413 |
-
* Internationalization (Italian and Japanese language files shipped)
|
414 |
-
|
415 |
-
= 0.5 (2009-01-09) =
|
416 |
-
* Fix for post-meta
|
417 |
-
* WP2.7 compatibility
|
418 |
-
|
419 |
-
= 0.4 (2008-11-23) =
|
420 |
-
* Support for new WP post revision feature
|
421 |
-
|
422 |
-
= 0.3 (2008-03-01) =
|
423 |
-
* Initial version on WP repository
|
424 |
|
425 |
== Contribute ==
|
426 |
|
2 |
Contributors: yoast, lopo
|
3 |
Donate link: https://yoast.com/wordpress/plugins/duplicate-post/
|
4 |
Tags: duplicate post, copy, clone
|
5 |
+
Requires at least: 5.9
|
6 |
+
Tested up to: 6.1
|
7 |
+
Stable tag: 4.5
|
8 |
Requires PHP: 5.6.20
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
69 |
5. Bulk actions.
|
70 |
6. The options page.
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 4.5 =
|
75 |
+
Release Date: June 28th, 2022
|
76 |
|
77 |
Enhancements:
|
78 |
|
79 |
+
* Improves the impact of the plugin on the performance of the site by avoiding useless calls on the `gettext` filter.
|
80 |
|
81 |
Bugfixes:
|
82 |
|
83 |
+
* Fixes a bug where a section in the Classic Editor's submitbox would be displayed with incorrect margins.
|
|
|
|
|
84 |
|
85 |
Other:
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
+
* Sets the WordPress tested up to version to 6.0.
|
88 |
|
89 |
+
= 4.4 =
|
90 |
+
Release Date: January 25th, 2022
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
Enhancements:
|
93 |
|
94 |
+
* Converts the upgrade notice into a welcome notice for first-time users.
|
95 |
|
96 |
Bugfixes:
|
97 |
|
98 |
+
* Fixes a bug where HTML tags in a Custom HTML block would be removed when republishing a scheduled Rewrite & Republish copy.
|
99 |
+
* Fixes a bug where the button style would be broken in the Classic Editor.
|
100 |
+
* Fixes a bug where a fatal error would be triggered in the Widgets page in combination with some themes or plugins.
|
101 |
|
102 |
Other:
|
103 |
|
104 |
+
* Sets the WordPress tested up to version to 5.9.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
+
= Earlier versions =
|
107 |
+
For the changelog of earlier versions, please refer to [the changelog on yoast.com](https://yoa.st/duplicate-post-changelog).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
== Contribute ==
|
110 |
|
src/ui/classic-editor.php
CHANGED
@@ -63,9 +63,8 @@ class Classic_Editor {
|
|
63 |
}
|
64 |
}
|
65 |
|
66 |
-
\
|
67 |
-
\add_filter( '
|
68 |
-
\add_filter( 'post_updated_messages', [ $this, 'change_scheduled_notice_classic_editor' ], 10, 1 );
|
69 |
|
70 |
\add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_classic_editor_scripts' ] );
|
71 |
if ( \intval( Utils::get_option( 'duplicate_post_show_link_in', 'submitbox' ) ) === 1 ) {
|
@@ -80,6 +79,16 @@ class Classic_Editor {
|
|
80 |
\add_filter( 'get_sample_permalink_html', [ $this, 'remove_sample_permalink_slug_editor' ], 10, 5 );
|
81 |
}
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
/**
|
84 |
* Enqueues the necessary JavaScript code for the Classic editor.
|
85 |
*
|
@@ -185,7 +194,7 @@ class Classic_Editor {
|
|
185 |
|
186 |
if ( $post instanceof WP_Post && $this->permissions_helper->is_rewrite_and_republish_copy( $post ) ) {
|
187 |
?>
|
188 |
-
<div id="check-changes-action">
|
189 |
<?php \esc_html_e( 'Do you want to compare your changes with the original version before merging? Please save any changes first.', 'duplicate-post' ); ?>
|
190 |
<br><br>
|
191 |
<a class='button' href=<?php echo \esc_url( $this->link_builder->build_check_link( $post ) ); ?>>
|
@@ -201,19 +210,23 @@ class Classic_Editor {
|
|
201 |
*
|
202 |
* @param string $translation The translated text.
|
203 |
* @param string $text The text to translate.
|
|
|
204 |
*
|
205 |
* @return string The to-be-used copy of the text.
|
206 |
*/
|
207 |
-
public function change_republish_strings_classic_editor( $translation, $text ) {
|
208 |
-
if ( $
|
209 |
-
|
210 |
-
|
211 |
-
}
|
212 |
|
213 |
-
|
214 |
-
|
215 |
-
return \__( 'Republish
|
216 |
-
|
|
|
|
|
|
|
|
|
217 |
}
|
218 |
|
219 |
return $translation;
|
@@ -224,11 +237,18 @@ class Classic_Editor {
|
|
224 |
*
|
225 |
* @param string $translation The translated text.
|
226 |
* @param string $text The text to translate.
|
|
|
|
|
227 |
*
|
228 |
* @return string The to-be-used copy of the text.
|
229 |
*/
|
230 |
-
public function change_schedule_strings_classic_editor( $translation, $text ) {
|
231 |
-
if ( $
|
|
|
|
|
|
|
|
|
|
|
232 |
return \__( 'Schedule republish', 'duplicate-post' );
|
233 |
}
|
234 |
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
\add_action( 'load-post.php', [ $this, 'hook_translations' ] );
|
67 |
+
\add_filter( 'post_updated_messages', [ $this, 'change_scheduled_notice_classic_editor' ] );
|
|
|
68 |
|
69 |
\add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_classic_editor_scripts' ] );
|
70 |
if ( \intval( Utils::get_option( 'duplicate_post_show_link_in', 'submitbox' ) ) === 1 ) {
|
79 |
\add_filter( 'get_sample_permalink_html', [ $this, 'remove_sample_permalink_slug_editor' ], 10, 5 );
|
80 |
}
|
81 |
|
82 |
+
/**
|
83 |
+
* Hooks the functions to change the translations.
|
84 |
+
*
|
85 |
+
* @return void
|
86 |
+
*/
|
87 |
+
public function hook_translations() {
|
88 |
+
\add_filter( 'gettext', [ $this, 'change_republish_strings_classic_editor' ], 10, 3 );
|
89 |
+
\add_filter( 'gettext_with_context', [ $this, 'change_schedule_strings_classic_editor' ], 10, 4 );
|
90 |
+
}
|
91 |
+
|
92 |
/**
|
93 |
* Enqueues the necessary JavaScript code for the Classic editor.
|
94 |
*
|
194 |
|
195 |
if ( $post instanceof WP_Post && $this->permissions_helper->is_rewrite_and_republish_copy( $post ) ) {
|
196 |
?>
|
197 |
+
<div id="check-changes-action" class="misc-pub-section">
|
198 |
<?php \esc_html_e( 'Do you want to compare your changes with the original version before merging? Please save any changes first.', 'duplicate-post' ); ?>
|
199 |
<br><br>
|
200 |
<a class='button' href=<?php echo \esc_url( $this->link_builder->build_check_link( $post ) ); ?>>
|
210 |
*
|
211 |
* @param string $translation The translated text.
|
212 |
* @param string $text The text to translate.
|
213 |
+
* @param string $domain The translation domain.
|
214 |
*
|
215 |
* @return string The to-be-used copy of the text.
|
216 |
*/
|
217 |
+
public function change_republish_strings_classic_editor( $translation, $text, $domain ) {
|
218 |
+
if ( $domain !== 'default' ) {
|
219 |
+
return $translation;
|
220 |
+
}
|
|
|
221 |
|
222 |
+
if ( $text === 'Publish'
|
223 |
+
&& $this->should_change_rewrite_republish_copy( \get_post() ) ) {
|
224 |
+
return \__( 'Republish', 'duplicate-post' );
|
225 |
+
}
|
226 |
+
elseif ( $text === 'Publish on: %s'
|
227 |
+
&& $this->should_change_rewrite_republish_copy( \get_post() ) ) {
|
228 |
+
/* translators: %s: Date on which the post is to be republished. */
|
229 |
+
return \__( 'Republish on: %s', 'duplicate-post' );
|
230 |
}
|
231 |
|
232 |
return $translation;
|
237 |
*
|
238 |
* @param string $translation The translated text.
|
239 |
* @param string $text The text to translate.
|
240 |
+
* @param string $context The translation context.
|
241 |
+
* @param string $domain The translation domain.
|
242 |
*
|
243 |
* @return string The to-be-used copy of the text.
|
244 |
*/
|
245 |
+
public function change_schedule_strings_classic_editor( $translation, $text, $context, $domain ) {
|
246 |
+
if ( $domain !== 'default' || $context !== 'post action/button label' ) {
|
247 |
+
return $translation;
|
248 |
+
}
|
249 |
+
|
250 |
+
if ( $text === 'Schedule'
|
251 |
+
&& $this->should_change_rewrite_republish_copy( \get_post() ) ) {
|
252 |
return \__( 'Schedule republish', 'duplicate-post' );
|
253 |
}
|
254 |
|
src/ui/newsletter.php
CHANGED
@@ -28,8 +28,8 @@ class Newsletter {
|
|
28 |
|
29 |
$email_label = \esc_html__( 'Email address', 'duplicate-post' );
|
30 |
|
31 |
-
$copy_privacy_policy = sprintf(
|
32 |
-
|
33 |
\esc_html__(
|
34 |
'Yoast respects your privacy. Read %1$sour privacy policy%2$s on how we handle your personal information.',
|
35 |
'duplicate-post'
|
28 |
|
29 |
$email_label = \esc_html__( 'Email address', 'duplicate-post' );
|
30 |
|
31 |
+
$copy_privacy_policy = \sprintf(
|
32 |
+
/* translators: %1$s and %2$s are replaced by opening and closing anchor tags. */
|
33 |
\esc_html__(
|
34 |
'Yoast respects your privacy. Read %1$sour privacy policy%2$s on how we handle your personal information.',
|
35 |
'duplicate-post'
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit54f1369b9135ce2e1472c9945cacd03c::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,15 +24,15 @@ class ComposerAutoloaderInitb771dd36b1819b8209dfac03b31cc9ed
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
-
call_user_func(\Composer\Autoload\
|
36 |
} else {
|
37 |
$classMap = require __DIR__ . '/autoload_classmap.php';
|
38 |
if ($classMap) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit54f1369b9135ce2e1472c9945cacd03c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit54f1369b9135ce2e1472c9945cacd03c', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit54f1369b9135ce2e1472c9945cacd03c', 'loadClassLoader'));
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit54f1369b9135ce2e1472c9945cacd03c::getInitializer($loader));
|
36 |
} else {
|
37 |
$classMap = require __DIR__ . '/autoload_classmap.php';
|
38 |
if ($classMap) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
@@ -162,9 +162,9 @@ class ComposerStaticInitb771dd36b1819b8209dfac03b31cc9ed
|
|
162 |
public static function getInitializer(ClassLoader $loader)
|
163 |
{
|
164 |
return \Closure::bind(function () use ($loader) {
|
165 |
-
$loader->prefixLengthsPsr4 =
|
166 |
-
$loader->prefixDirsPsr4 =
|
167 |
-
$loader->classMap =
|
168 |
|
169 |
}, null, ClassLoader::class);
|
170 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit54f1369b9135ce2e1472c9945cacd03c
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
162 |
public static function getInitializer(ClassLoader $loader)
|
163 |
{
|
164 |
return \Closure::bind(function () use ($loader) {
|
165 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit54f1369b9135ce2e1472c9945cacd03c::$prefixLengthsPsr4;
|
166 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit54f1369b9135ce2e1472c9945cacd03c::$prefixDirsPsr4;
|
167 |
+
$loader->classMap = ComposerStaticInit54f1369b9135ce2e1472c9945cacd03c::$classMap;
|
168 |
|
169 |
}, null, ClassLoader::class);
|
170 |
}
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'yoast/duplicate-post',
|
10 |
'dev' => false,
|
11 |
),
|
@@ -37,7 +37,7 @@
|
|
37 |
'type' => 'wordpress-plugin',
|
38 |
'install_path' => __DIR__ . '/../../',
|
39 |
'aliases' => array(),
|
40 |
-
'reference' => '
|
41 |
'dev_requirement' => false,
|
42 |
),
|
43 |
),
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '66efa2fa0d3b8a0b3af956da9385531f2b6e1ae7',
|
9 |
'name' => 'yoast/duplicate-post',
|
10 |
'dev' => false,
|
11 |
),
|
37 |
'type' => 'wordpress-plugin',
|
38 |
'install_path' => __DIR__ . '/../../',
|
39 |
'aliases' => array(),
|
40 |
+
'reference' => '66efa2fa0d3b8a0b3af956da9385531f2b6e1ae7',
|
41 |
'dev_requirement' => false,
|
42 |
),
|
43 |
),
|