Use PHP functions
This commit is contained in:
committed by
M. Shull
parent
879a36e0f2
commit
5d1623a083
@@ -35,7 +35,7 @@ class SettingsController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_array($setting) && is_array($default)) {
|
if (is_array($setting) && is_array($default)) {
|
||||||
return WPFunctions::get()->arrayReplaceRecursive($default, $setting);
|
return array_replace_recursive($default, $setting);
|
||||||
}
|
}
|
||||||
return $setting;
|
return $setting;
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ class SettingsController {
|
|||||||
|
|
||||||
function getAll() {
|
function getAll() {
|
||||||
$this->ensureLoaded();
|
$this->ensureLoaded();
|
||||||
return WPFunctions::get()->arrayReplaceRecursive($this->getAllDefaults(), self::$settings);
|
return array_replace_recursive($this->getAllDefaults(), self::$settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
function set($key, $value) {
|
function set($key, $value) {
|
||||||
|
@@ -105,10 +105,6 @@ class Functions {
|
|||||||
return admin_url($path, $scheme);
|
return admin_url($path, $scheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
function arrayReplaceRecursive(array $base = [], array $replacements = []) {
|
|
||||||
return array_replace_recursive($base, $replacements);
|
|
||||||
}
|
|
||||||
|
|
||||||
function currentFilter() {
|
function currentFilter() {
|
||||||
return current_filter();
|
return current_filter();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user