For metadata values that can either be booleans or paths to booleans, gets the value.
Description
$data = array( ‘color’ => array( ‘defaultPalette’ => true ) );
static::get_metadata_boolean( $data, false );
// => false
static::get_metadata_boolean( $data, array( 'color', 'defaultPalette' ) );
// => true
Parameters
$data
arrayrequired- The data to inspect.
$path
bool|arrayrequired- Boolean or path to a boolean.
$default_value
booloptional- Default value if the referenced path is missing.
Default:
false
Source
}
// 2. Generate and append the rules that use the general selector.
$block_rules .= static::to_ruleset( $selector, $declarations );
// 3. Generate and append the rules that use the duotone selector.
if ( isset( $block_metadata['duotone'] ) && ! empty( $declarations_duotone ) ) {
$block_rules .= static::to_ruleset( $block_metadata['duotone'], $declarations_duotone );
}
// 4. Generate Layout block gap styles.
if (
static::ROOT_BLOCK_SELECTOR !== $selector &&
! empty( $block_metadata['name'] )
Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.