-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iterate on the public API of WP_Theme_JSON_Resolver #28855
Conversation
Size Change: 0 B Total Size: 1.37 MB ℹ️ View Unchanged
|
I've rebased this branch from |
fa72084
to
144ccae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and confirmed nothing breaks. Code is clean and an improvement over what we previously had.
This looks good to me 👍
Follow up to #28700
This PR iterates on the public API of the
WP_Theme_JSON_Resolver
class. This is the whole API after the changes in this PR (all methods are static):get_core_data
=> returns core data as it is in the core's theme.json file.get_theme_data
=> returns theme data as it is in the theme.json file.get_user_data
=> returns user data as it is in the database (custom post type).get_merged_data( $theme_data, $origin )
=> returns the merged data atregister_user_custom_post_type
=> register the CPT to store user's dataget_user_custom_post_type_id
=> returns the ID of the user CPTtheme_has_support
=> whether the current theme has support fortheme.json
Follow-ups:
locate_template
by our own method Add an 'area' term for Template Parts. #28410 (comment)