PluginProbe
WindPress – Tailwind CSS integration for WordPress / 3.2.89
WindPress – Tailwind CSS integration for WordPress v3.2.89
3.2.89 3.2.88 3.2.87 3.2.86 3.2.85 3.2.84 3.2.83 3.2.82 3.2.81 trunk 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 All 143 releases
← All changes | src/Utils/Config.php +11 -11 3.0.123.2.89 View file →
@@ -45,10 +45,10 @@
45 45 * @return mixed The value at the end of the property path
46 46 */
47 47 public static function get($path, $defaultValue = null)
48 48 {
49 - $options = \json_decode(\get_option(WIND_PRESS::WP_OPTION . '_options', '{}'), null, 512, \JSON_THROW_ON_ERROR);
50 - $options = \apply_filters('f!windpress/utlis/config:options', $options);
49 + $options = json_decode(get_option(WIND_PRESS::WP_OPTION . '_options', '{}'), null, 512, \JSON_THROW_ON_ERROR);
50 + $options = apply_filters('f!windpress/utlis/config:options', $options);
51 51 try {
52 52 return self::propertyAccessor()->getValue($options, $path);
53 53 } catch (Exception $exception) {
54 54 return $defaultValue;
@@ -65,16 +65,16 @@
65 65 * @throws UnexpectedTypeException If a value within the path is neither object nor array
66 66 */
67 67 public static function set($path, $value)
68 68 {
69 - $options = \json_decode(\get_option(WIND_PRESS::WP_OPTION . '_options', '{}'), null, 512, \JSON_THROW_ON_ERROR);
70 - $options = \apply_filters('f!windpress/utlis/config:options', $options);
69 + $options = json_decode(get_option(WIND_PRESS::WP_OPTION . '_options', '{}'), null, 512, \JSON_THROW_ON_ERROR);
70 + $options = apply_filters('f!windpress/utlis/config:options', $options);
71 71 if (self::propertyAccessor()->isWritable($options, $path)) {
72 72 self::propertyAccessor()->setValue($options, $path, $value);
73 73 } else {
74 74 self::data_set($options, $path, $value);
75 75 }
76 - \update_option(WIND_PRESS::WP_OPTION . '_options', \wp_json_encode($options, \JSON_THROW_ON_ERROR));
76 + update_option(WIND_PRESS::WP_OPTION . '_options', wp_json_encode($options, \JSON_THROW_ON_ERROR));
77 77 }
78 78 /**
79 79 * Set an item on an array or object using dot notation.
80 80 *
@@ -87,10 +87,10 @@
87 87 * @see https://github.com/laravel/framework/blob/a84c4f41d3fb1c57684bb417b1f0858300e769d0/src/Illuminate/Collections/helpers.php#L109
88 88 */
89 89 public static function data_set(&$target, $key, $value, $overwrite = \true)
90 90 {
91 - $segments = \is_array($key) ? $key : \explode('.', $key);
92 - if (($segment = \array_shift($segments)) === '*') {
91 + $segments = is_array($key) ? $key : explode('.', $key);
92 + if (($segment = array_shift($segments)) === '*') {
93 93 if (!self::array_accessible($target)) {
94 94 $target = [];
95 95 }
96 96 if ($segments) {
@@ -110,9 +110,9 @@
110 110 self::data_set($target[$segment], $segments, $value, $overwrite);
111 111 } elseif ($overwrite || !self::array_exists($target, $segment)) {
112 112 $target[$segment] = $value;
113 113 }
114 - } elseif (\is_object($target)) {
114 + } elseif (is_object($target)) {
115 115 if ($segments) {
116 116 if (!isset($target->{$segment})) {
117 117 $target->{$segment} = [];
118 118 }
@@ -143,12 +143,12 @@
143 143 {
144 144 if ($array instanceof ArrayAccess) {
145 145 return $array->offsetExists($key);
146 146 }
147 - if (\is_float($key)) {
147 + if (is_float($key)) {
148 148 $key = (string) $key;
149 149 }
150 - return \array_key_exists($key, $array);
150 + return array_key_exists($key, $array);
151 151 }
152 152 /**
153 153 * Determine whether the given value is array accessible.
154 154 *
@@ -158,7 +158,7 @@
158 158 * @see https://github.com/laravel/framework/blob/a84c4f41d3fb1c57684bb417b1f0858300e769d0/src/Illuminate/Collections/Arr.php#L21
159 159 */
160 160 public static function array_accessible($value)
161 161 {
162 - return \is_array($value) || $value instanceof ArrayAccess;
162 + return is_array($value) || $value instanceof ArrayAccess;
163 163 }
164 164 }