Skip pluggable functions when building for WP Core#76048
Skip pluggable functions when building for WP Core#76048
Conversation
|
Size Change: 0 B Total Size: 6.87 MB ℹ️ View Unchanged
|
|
Flaky tests detected in ed7e368. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22587372854
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
I believe we should try as much as possible to avoid "specific building for WordPress Core". So I have a strong preference for just removing the conditions. |
I do agree with that. It should be flexible enough so specific conditions for just Core are not required. Closing this in favor of #76062. |
What?
Alternative approach to #76062. See #75984.
This adds parsing to remove the
! function_exists()checks that wrap the functions withinpackage/wp-build/templatestemplate files used to generate PHP files during build when the build process is run for WordPress Core.Why?
Functions become what's known as "pluggable" when wrapped in this conditional check. This was a practice that predated the Hooks API (actions/filters) and caused many problems.
"Plugged" versions cannot be trusted to maintain the intended core behavior.
When
wp_*functions exist in WordPress Core, they should not be shipped as pluggable.How?
This removes the
! function_exists()wrapping conditional when building for WordPress Core.