[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
WP_Theme_JSON_Schema class
File Size: | 152 lines (4 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Theme_JSON_Schema:: (5 methods):
migrate()
migrate_v1_to_v2()
rename_paths()
rename_settings()
unset_setting_by_path()
Class: WP_Theme_JSON_Schema - X-Ref
Class that migrates a given theme.json structure to the latest schema.migrate( $theme_json ) X-Ref |
Function that migrates a given theme.json structure to the last version. param: array $theme_json The structure to migrate. return: array The structure in the last version. since: 5.9.0 |
migrate_v1_to_v2( $old ) X-Ref |
Removes the custom prefixes for a few properties that were part of v1: 'border.customRadius' => 'border.radius', 'spacing.customMargin' => 'spacing.margin', 'spacing.customPadding' => 'spacing.padding', 'typography.customLineHeight' => 'typography.lineHeight', param: array $old Data to migrate. return: array Data without the custom prefixes. since: 5.9.0 |
rename_paths( $settings, $paths_to_rename ) X-Ref |
Processes the settings subtree. param: array $settings Array to process. param: array $paths_to_rename Paths to rename. return: array The settings in the new format. since: 5.9.0 |
rename_settings( &$settings, $paths_to_rename ) X-Ref |
Processes a settings array, renaming or moving properties. param: array $settings Reference to settings either defaults or an individual block's. param: array $paths_to_rename Paths to rename. since: 5.9.0 |
unset_setting_by_path( &$settings, $path ) X-Ref |
Removes a property from within the provided settings by its path. param: array $settings Reference to the current settings array. param: array $path Path to the property to be removed. return: void since: 5.9.0 |
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |