wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_get_root_state_style › WordPress Function

Seit7.1.0
Veraltetn/v
wp_get_root_state_style ( $state_style, $nested_keys )
Parameter: (2)
  • (array) $state_style State style object.
    Erforderlich: Ja
  • (array) $nested_keys Keys to remove from the root style object.
    Erforderlich: Ja
Gibt zurück:
  • (array) Root-only style object.
Definiert in:
Codex:

Returns a style object with nested state keys removed.



Quellcode

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;
}