Skip to content

Commit

Permalink
Exclude polylang post_translations taxonomy
Browse files Browse the repository at this point in the history
  • Loading branch information
grappler committed Oct 14, 2021
1 parent 1be9c4e commit 0869c1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions src/class-post-duplicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,15 @@ public function set_modified( $data ) {
*/
public function create_duplicate_for_rewrite_and_republish( \WP_Post $post ) {
$options = [
'copy_title' => true,
'copy_date' => true,
'copy_name' => false,
'copy_content' => true,
'copy_excerpt' => true,
'copy_author' => true,
'copy_menu_order' => true,
'use_filters' => false,
'copy_title' => true,
'copy_date' => true,
'copy_name' => false,
'copy_content' => true,
'copy_excerpt' => true,
'copy_author' => true,
'copy_menu_order' => true,
'use_filters' => false,
'taxonomies_excludelist' => [ 'post_translations' ],
];
$defaults = $this->get_default_options();
$options = \wp_parse_args( $options, $defaults );
Expand Down
2 changes: 1 addition & 1 deletion src/class-post-republisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ protected function republish_post_taxonomies( $post ) {
$original_post_id = Utils::get_original_post_id( $post->ID );

$copy_taxonomies_options = [
'taxonomies_excludelist' => [],
'taxonomies_excludelist' => [ 'post_translations' ],
'use_filters' => false,
'copy_format' => true,
];
Expand Down

0 comments on commit 0869c1d

Please sign in to comment.