wp_get_root_state_style()
Returns a style object with nested state keys removed.
Хуков нет.
Возвращает
array. Root-only style object.
Использование
wp_get_root_state_style( $state_style, $nested_keys );
- $state_style(массив) (обязательный)
- State style object.
- $nested_keys(массив) (обязательный)
- Keys to remove from the root style object.
Список изменений
| С версии 7.1.0 | Введена. |
Код wp_get_root_state_style() wp get root state style WP 7.1.2
function wp_get_root_state_style( $state_style, $nested_keys ) {
if ( ! is_array( $state_style ) ) {
return $state_style;
}
$root_style = $state_style;
foreach ( $nested_keys as $key ) {
unset( $root_style[ $key ] );
}
return $root_style;
}