WP_Theme_JSON::update_separator_declarations( array $declarations ): array

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Returns a filtered declarations array if there is a separator block with only a background style defined in theme.json by adding a color attribute to reflect the changes in the front.

Parameters

$declarationsarrayrequired
List of declarations.

Return

array $declarations List of declarations filtered.

Source

	 * @param array $nodes Style nodes with metadata.
	 */
	return apply_filters( 'wp_theme_json_get_style_nodes', $nodes );
}

/**
 * A public helper to get the block nodes from a theme.json file.
 *
 * @since 6.1.0
 *
 * @return array The block nodes in theme.json.
 */
public function get_styles_block_nodes() {
	return static::get_block_nodes( $this->theme_json );
}

/**
 * Returns a filtered declarations array if there is a separator block with only a background
 * style defined in theme.json by adding a color attribute to reflect the changes in the front.
 *
 * @since 6.1.1
 *
 * @param array $declarations List of declarations.
 * @return array $declarations List of declarations filtered.
 */
private static function update_separator_declarations( $declarations ) {
	$background_color     = '';
	$border_color_matches = false;

Changelog

VersionDescription
6.1.1Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.