PluginProbe
Polylang / 3.6.7
Polylang v3.6.7
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/settings-sync.php +18 -8 2.73.6.7 View file →
@@ -1,5 +1,8 @@
1 1 <?php
2 +/**
3 + * @package Polylang
4 + */
2 5
3 6 /**
4 7 * Settings class for synchronization settings management
5 8 *
@@ -5,8 +8,14 @@
5 8 *
6 9 * @since 1.8
7 10 */
8 11 class PLL_Settings_Sync extends PLL_Settings_Module {
12 + /**
13 + * Stores the display order priority.
14 + *
15 + * @var int
16 + */
17 + public $priority = 50;
9 18
10 19 /**
11 20 * Constructor
12 21 *
@@ -11,9 +20,9 @@
11 20 * Constructor
12 21 *
13 22 * @since 1.8
14 23 *
15 - * @param object $polylang polylang object
24 + * @param object $polylang The polylang object.
16 25 */
17 26 public function __construct( &$polylang ) {
18 27 parent::__construct(
19 28 $polylang,
@@ -57,25 +66,26 @@
57 66 <?php
58 67 }
59 68
60 69 /**
61 - * Sanitizes the settings before saving
70 + * Sanitizes the settings before saving.
62 71 *
63 72 * @since 1.8
64 73 *
65 - * @param array $options
74 + * @param array $options Unsanitized options to save.
75 + * @return array
66 76 */
67 77 protected function update( $options ) {
68 78 $newoptions = array( 'sync' => empty( $options['sync'] ) ? array() : array_keys( $options['sync'], 1 ) );
69 - return $newoptions; // take care to return only validated options
79 + return $newoptions; // Take care to return only validated options.
70 80 }
71 81
72 82 /**
73 - * Get the row actions
83 + * Get the row actions.
74 84 *
75 85 * @since 1.8
76 86 *
77 - * @return array
87 + * @return string[] Row actions.
78 88 */
79 89 protected function get_actions() {
80 90 return empty( $this->options['sync'] ) ? array( 'configure' ) : array( 'configure', 'deactivate' );
81 91 }
@@ -80,13 +90,13 @@
80 90 return empty( $this->options['sync'] ) ? array( 'configure' ) : array( 'configure', 'deactivate' );
81 91 }
82 92
83 93 /**
84 - * List the post metas to synchronize
94 + * Get the list of synchronization settings.
85 95 *
86 96 * @since 1.0
87 97 *
88 - * @return array
98 + * @return string[] Array synchronization options.
89 99 */
90 100 public static function list_metas_to_sync() {
91 101 return array(
92 102 'taxonomies' => __( 'Taxonomies', 'polylang' ),