Post Duplicator - Version 2.22

Version Description

  • Fixed Gutenburg escaping in returns for ACF blocks
Download this release

Release Info

Developer metaphorcreations
Plugin Icon 128x128 Post Duplicator
Version 2.22
Comparing to
See all releases

Code changes from version 2.21 to 2.22

Files changed (3) hide show
  1. includes/ajax.php +3 -1
  2. m4c-postduplicator.php +2 -2
  3. readme.txt +5 -2
includes/ajax.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /* --------------------------------------------------------- */
4
- /* !Duplicate the post - 2.20 */
5
  /* --------------------------------------------------------- */
6
 
7
  function mtphr_duplicate_post( $original_id, $args=array(), $do_action=true ) {
@@ -54,6 +54,8 @@ function mtphr_duplicate_post( $original_id, $args=array(), $do_action=true ) {
54
  unset( $duplicate['guid'] );
55
  unset( $duplicate['comment_count'] );
56
 
 
 
57
  // Insert the post into the database
58
  $duplicate_id = wp_insert_post( $duplicate );
59
 
1
  <?php
2
 
3
  /* --------------------------------------------------------- */
4
+ /* !Duplicate the post - 2.22 */
5
  /* --------------------------------------------------------- */
6
 
7
  function mtphr_duplicate_post( $original_id, $args=array(), $do_action=true ) {
54
  unset( $duplicate['guid'] );
55
  unset( $duplicate['comment_count'] );
56
 
57
+ $duplicate['post_content'] = str_replace( array( '\r\n', '\r', '\n' ), '<br />', $duplicate['post_content'] ); //Handles guttenburg escaping in returns for blocks
58
+
59
  // Insert the post into the database
60
  $duplicate_id = wp_insert_post( $duplicate );
61
 
m4c-postduplicator.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Post Duplicator
4
  Description: Creates functionality to duplicate any and all post types, including taxonomies & custom fields
5
- Version: 2.21
6
  Author: Metaphor Creations
7
  Author URI: http://www.metaphorcreations.com
8
  Text Domain: post-duplicator
@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30
 
31
 
32
  /**Define Widget Constants */
33
- define ( 'MTPHR_POST_DUPLICATOR_VERSION', '2.21' );
34
  define ( 'MTPHR_POST_DUPLICATOR_DIR', plugin_dir_path(__FILE__) );
35
 
36
 
2
  /*
3
  Plugin Name: Post Duplicator
4
  Description: Creates functionality to duplicate any and all post types, including taxonomies & custom fields
5
+ Version: 2.22
6
  Author: Metaphor Creations
7
  Author URI: http://www.metaphorcreations.com
8
  Text Domain: post-duplicator
30
 
31
 
32
  /**Define Widget Constants */
33
+ define ( 'MTPHR_POST_DUPLICATOR_VERSION', '2.22' );
34
  define ( 'MTPHR_POST_DUPLICATOR_DIR', plugin_dir_path(__FILE__) );
35
 
36
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: metaphorcreations
3
  Tags: posts, post, duplicate, duplication
4
  Requires at least: 4.0
5
- Tested up to: 5.5
6
  Stable tag: /trunk/
7
  License: GPL2
8
 
@@ -41,6 +41,9 @@ Check out the 'Installation' tab.
41
 
42
  == Changelog ==
43
 
 
 
 
44
  = 2.21 =
45
  * Javascript update for WP 5.5
46
 
@@ -127,4 +130,4 @@ Must upgrade in order for the plugin to work. The file paths where initially wro
127
 
128
  == Upgrade Notice ==
129
 
130
- Javascript update for WP 5.5
2
  Contributors: metaphorcreations
3
  Tags: posts, post, duplicate, duplication
4
  Requires at least: 4.0
5
+ Tested up to: 5.5.1
6
  Stable tag: /trunk/
7
  License: GPL2
8
 
41
 
42
  == Changelog ==
43
 
44
+ = 2.22 =
45
+ * Fixed Gutenburg escaping in returns for ACF blocks
46
+
47
  = 2.21 =
48
  * Javascript update for WP 5.5
49
 
130
 
131
  == Upgrade Notice ==
132
 
133
+ Fixed Gutenburg escaping in returns for ACF blocks