WP_Theme_JSON::convert_custom_properties( string $value ): string

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.

This is used to convert the internal representation of variables to the CSS representation.

Description

For example, var:preset|color|vivid-green-cyan becomes var(--wp--preset--color--vivid-green-cyan).

Parameters

$valuestringrequired
The variable such as var:preset|color|vivid-green-cyan to convert.

Return

string The converted variable.

Source

					}
				}
			}
		}
	}

	wp_recursive_ksort( $output );

	return $output;
}

/**
 * Sets the spacingSizes array based on the spacingScale values from theme.json.
 *
 * @since 6.1.0
 *

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

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