You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the PR below a "registration function" was named with the wp_ prefix. This followed the documented guidelines for PHP in Gutenberg. However as the discussion below indicates, there is an exception for "registration functions".
We should document the exception to help future contributors.
If @youknowriad or anyone can explain why we have this exception that would help 🙇
> Do we need to update that documentation or add qualifiers/exceptions to the rules?
It's very hard to come up with a good rule. But yeah for this case (registration functions) it seems better to avoid the prefix.
Is it possible to register a wp_template_part or is this just for wp_templates?
We want to ultimately absorb template parts in patterns and patterns already have registration API.
In the PR below a "registration function" was named with the
wp_
prefix. This followed the documented guidelines for PHP in Gutenberg. However as the discussion below indicates, there is an exception for "registration functions".We should document the exception to help future contributors.
If @youknowriad or anyone can explain why we have this exception that would help 🙇
It's very hard to come up with a good rule. But yeah for this case (registration functions) it seems better to avoid the prefix.
We want to ultimately absorb template parts in patterns and patterns already have registration API.
Can anyone help with the renaming work?
Originally posted by @youknowriad in #61577 (comment)
The text was updated successfully, but these errors were encountered: