-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce an interface so all schemas implement the same
- Loading branch information
Showing
4 changed files
with
32 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/** | ||
* Schema interface for theme.json structures. | ||
* | ||
* @package gutenberg | ||
*/ | ||
|
||
interface WP_Theme_JSON_Schema { | ||
/** | ||
* Parses an array that follows an old theme.json schema | ||
* into the latest theme.json schema. | ||
* | ||
* @param array $theme_json Old data to convert. | ||
* | ||
* @return array The data in the latest theme.json schema. | ||
*/ | ||
public static function parse( $theme_json ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters