PluginProbe
Polylang / 3.1.4
Polylang v3.1.4
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | modules/sync/sync-post-metas.php +14 -6 2.7.13.1.4 View file →
@@ -1,5 +1,8 @@
1 1 <?php
2 +/**
3 + * @package Polylang
4 + */
2 5
3 6 /**
4 7 * A class to manage copy and synchronization of post metas
5 8 *
@@ -5,8 +8,13 @@
5 8 *
6 9 * @since 2.3
7 10 */
8 11 class PLL_Sync_Post_Metas extends PLL_Sync_Metas {
12 + /**
13 + * Stores the plugin options.
14 + *
15 + * @var array
16 + */
9 17 public $options;
10 18
11 19 /**
12 20 * Constructor
@@ -25,17 +33,17 @@
25 33 add_filter( 'pll_translate_post_meta', array( $this, 'translate_thumbnail_id' ), 10, 3 );
26 34 }
27 35
28 36 /**
29 - * Get the custom fields to copy or synchronize
37 + * Get the custom fields to copy or synchronize.
30 38 *
31 39 * @since 2.3
32 40 *
33 - * @param int $from Id of the post from which we copy informations
34 - * @param int $to Id of the post to which we paste informations
35 - * @param string $lang Language slug
36 - * @param bool $sync True if it is synchronization, false if it is a copy
37 - * @return array List of meta keys
41 + * @param int $from Id of the post from which we copy informations.
42 + * @param int $to Id of the post to which we paste informations.
43 + * @param string $lang Language slug.
44 + * @param bool $sync True if it is synchronization, false if it is a copy.
45 + * @return string[] List of meta keys.
38 46 */
39 47 protected function get_metas_to_copy( $from, $to, $lang, $sync = false ) {
40 48 // Copy or synchronize post metas and allow plugins to do the same
41 49 $metas = get_post_custom( $from );