-
Notifications
You must be signed in to change notification settings - Fork 87
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
Question: Theme patterns with custom PHP functions & WP-CLI #33
Comments
Hi I think you may be right that is about when the patterns are initialized. Patterns are registered on init: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @carolinan I have a question and I can't figure out if this is a bug in core, or in WP-CLI, or both or neither...
My team and I have been building a FSE theme and we've been reading and referring to your fullsiteediting.com website (and the related examples here in GitHub) and we've stumbled into an issue I can recreate with at least one of your starter themes:
wp core is-installed
Resulting error:
I've first been trying to review pattern-related code and guides and I don't see anything that explicitly prohibits or says theme devs should not be using custom PHP functions in the pattern . It seems like the whole point of the pattern being in PHP is to allow using custom functions.
It seems WP Core functions are allowed.
I think it comes down to, really, that the theme isn't "loaded" for some of these wp-cli commands but the pattern is still evaluated due to core bootstrapping? I'm not sure... I figured I'd ask you what you thought about this first because you seem to be know all things FSE pretty well.
Thanks!
The text was updated successfully, but these errors were encountered: