PluginProbe
Polylang / 2.6.2
Polylang v2.6.2
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 | settings/settings-module.php +4 -82 2.9.22.6.2 View file →
@@ -1,8 +1,5 @@
1 1 <?php
2 -/**
3 - * @package Polylang
4 - */
5 2
6 3 /**
7 4 * Base class for all settings
8 5 *
@@ -8,87 +5,14 @@
8 5 *
9 6 * @since 1.8
10 7 */
11 8 class PLL_Settings_Module {
12 - /**
13 - * Stores the plugin options.
14 - *
15 - * @var array
16 - */
9 + public $active_option, $configure;
10 + public $module, $title, $description;
17 11 public $options;
12 + protected $action_links, $buttons, $form = false;
18 13
19 14 /**
20 - * Instance of PLL_Model.
21 - *
22 - * @var PLL_Model
23 - */
24 - public $model;
25 -
26 - /**
27 - * Instance of a child class of PLL_Links_Model.
28 - *
29 - * @var PLL_Links_Model
30 - */
31 - public $links_model;
32 -
33 - /**
34 - * Stores if the module is active.
35 - *
36 - * @var bool
37 - */
38 - public $active_option;
39 -
40 - /**
41 - * Stores the display order priority.
42 - *
43 - * @var int
44 - */
45 - public $priority = 100;
46 -
47 - /**
48 - * Stores the module name.
49 - * It must be unique.
50 - *
51 - * @var string
52 - */
53 - public $module;
54 -
55 - /**
56 - * Stores the module title.
57 - *
58 - * @var string
59 - */
60 - public $title;
61 -
62 - /**
63 - * Stores the module description.
64 - *
65 - * @var string
66 - */
67 - public $description;
68 -
69 - /**
70 - * Stores the settings actions.
71 - *
72 - * @var array
73 - */
74 - protected $action_links;
75 -
76 - /**
77 - * Stores html fragment for the buttons.
78 - *
79 - * @var array
80 - */
81 - protected $buttons;
82 -
83 - /**
84 - * Stores html form when provided by a child class.
85 - *
86 - * @var bool|string
87 - */
88 - protected $form = false;
89 -
90 - /**
91 15 * Constructor
92 16 *
93 17 * @since 1.8
94 18 *
@@ -215,9 +139,9 @@
215 139 *
216 140 * @param array $options Raw options
217 141 * @return array Options
218 142 */
219 - protected function update( $options ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
143 + protected function update( $options ) {
220 144 return array(); // It's responsibility of the child class to decide what is saved
221 145 }
222 146
223 147 /**
@@ -269,10 +193,8 @@
269 193 *
270 194 * @return array
271 195 */
272 196 protected function get_actions() {
273 - $actions = array();
274 -
275 197 if ( $this->is_active() && $this->get_form() ) {
276 198 $actions[] = 'configure';
277 199 }
278 200