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

	}
}

/**
 * Enables some opt-in settings if theme declared support.
 *
 * @since 5.9.0
 *
 * @param array $theme_json A theme.json structure to modify.
 * @return array The modified theme.json structure.
 */
protected static function maybe_opt_in_into_settings( $theme_json ) {
	$new_theme_json = $theme_json;

	if (
		isset( $new_theme_json['settings']['appearanceTools'] ) &&
		true === $new_theme_json['settings']['appearanceTools']
	) {
		static::do_opt_in_into_settings( $new_theme_json['settings'] );
	}

Changelog

VersionDescription
5.9.0Introduced.

User Contributed Notes

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