GC_Customize_Setting::multidimensional_get()
最后更新于:2021-11-27 08:43:08
GC_Customize_Setting::multidimensional_get( array$root, array$keys, mixed$default=null)Will attempt to fetch a specific value from a multidimensional array.
参数
- $root
-
(array) (Required)
- $keys
-
(array) (Required)
- $default
-
(mixed) (Optional) A default value which is used as a fallback.
Default value: null
响应
(mixed) The requested value or the default value.
源文件
文件: gc-includes/class-gc-customize-setting.php
final protected function multidimensional_get( $root, $keys, $default = null ) {
if ( empty( $keys ) ) { // If there are no keys, test the root.
return isset( $root ) ? $root : $default;
}
$result = $this->multidimensional( $root, $keys );
return isset( $result ) ? $result['node'][ $result['key'] ] : $default;
}