Problème with duplication of
-
Il use polylang 1.9.3 and I try to synch custom metasdatas in all languages by using this :
add_filter('pll_copy_post_metas', function ($metas) { if (get_post_type() == 'projet') { return array_merge($metas, array( 'galerie' )); } });
And I get thoses errors only when I translate a post. Of course no data is synch (not even the thumbnail)
Warning: array_merge(): Argument #1 is not an array in /my-folder/wp-content/themes/bach-nguyen-architecture/config/metaboxes/projet.php on line 69 Warning: array_unique() expects parameter 1 to be array, null given in /my-folder/wp-content/plugins/polylang/modules/sync/admin-sync.php on line 202 Warning: Invalid argument supplied for foreach() in /my-folder/wp-content/plugins/polylang/modules/sync/admin-sync.php on line 205
NB : When I remove the pll_copy_post_metas filter I still have the last 2 errors
Can anybody help me ?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Problème with duplication of’ is closed to new replies.