PluginProbe
Import WP – CSV & XML Import Export for WordPress / 2.15.0
Import WP – CSV & XML Import Export for WordPress v2.15.0
2.15.1 2.15.0 2.14.24 2.14.23 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.9.0 2.9.1 All 144 releases
← All changes | class/Common/Properties/Properties.php +16 -5 2.7.3 → 2.15.0 View file →
@@ -3,8 +3,9 @@
3 3 namespace ImportWP\Common\Properties;
4 4
5 5 use ImportWP\Common\Util\Singleton;
6 6
7 +#[\AllowDynamicProperties]
7 8 class Properties
8 9 {
9 10 use Singleton;
10 11
@@ -21,9 +22,15 @@
21 22 public $chunk_size;
22 23 public $file_rotation;
23 24 public $log_rotation;
24 25 public $timeout;
26 + public $is_pro;
25 27
28 + public $mu_plugin_version;
29 + public $mu_plugin_dir;
30 + public $mu_plugin_source;
31 + public $mu_plugin_dest;
32 +
26 33 public $rest_version;
27 34 public $rest_namespace;
28 35
29 36 public function __construct()
@@ -48,13 +55,17 @@
48 55 }
49 56
50 57 protected function get_available_encodings()
51 58 {
52 - $encodings = mb_list_encodings();
53 59 $output = [];
54 - foreach ($encodings as $encoding) {
55 - $output[$encoding] = $encoding;
60 +
61 + if (function_exists('mb_list_encodings')) {
62 + $encodings = mb_list_encodings();
63 + foreach ($encodings as $encoding) {
64 + $output[$encoding] = $encoding;
65 + }
56 66 }
67 +
57 68 return $output;
58 69 }
59 70
60 71 public function _default_settings()
@@ -85,9 +96,9 @@
85 96
86 97 public function get_settings()
87 98 {
88 99 $defaults = $this->_default_settings();
89 - $settings = get_site_option('iwp_settings', []);
100 + $settings = get_option('iwp_settings', []);
90 101 $output = [];
91 102
92 103 foreach ($defaults as $setting => $default) {
93 104 $output[$setting] = isset($settings[$setting]) ? $settings[$setting] : $default['value'];
@@ -98,9 +109,9 @@
98 109
99 110 public function get_setting($key)
100 111 {
101 112 $defaults = $this->_default_settings();
102 - $settings = get_site_option('iwp_settings', []);
113 + $settings = get_option('iwp_settings', []);
103 114
104 115 if (!isset($defaults[$key])) {
105 116 return false;
106 117 }