WP_Theme_JSON::maybe_opt_in_into_settings( array $theme_json ): array

In this article

Enables some opt-in settings if theme declared support.

Parameters

$theme_jsonarrayrequired
A theme.json structure to modify.

Return

array The modified theme.json structure.

Source

	$class_name = '';

	if ( isset( static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $element ] ) ) {
		$class_name = static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $element ];
	}

	return $class_name;
}

/**
 * Options that settings.appearanceTools enables.
 *
 * @since 6.0.0
 * @since 6.2.0 Added `dimensions.minHeight` and `position.sticky`.
 * @since 6.4.0 Added `background.backgroundImage`.
 * @since 6.5.0 Added `background.backgroundSize` and `dimensions.aspectRatio`.
 * @var array
 */
const APPEARANCE_TOOLS_OPT_INS = array(
	array( 'background', 'backgroundImage' ),

Changelog

VersionDescription
5.9.0Introduced.

User Contributed Notes

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