-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix the data dynamic property in WP_Term #4307
Fix the data dynamic property in WP_Term #4307
Conversation
data
dynamic property in WP_Term
data
dynamic property in WP_Term24f1e96
to
993587a
Compare
e6e9171
to
6ac4bff
Compare
Thank you for the code review, @mukeshpanchal27. |
caef2fc
to
4059886
Compare
I'm closing this PR as the solution needs more refinement. |
Reopening this PR as IMO it's the most simplistic approach to resolve the issue and goals (see my reasonings here). |
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 Core Committers: Use this line as a base for the props when committing in SVN:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
The WP_Term class employs the __get magic method to compute the object data. However, since PHP 8.2 does not support dynamic properties, it is better to eliminate this approach.
Fix indentation. Co-authored-by: Mukesh Panchal <[email protected]>
4059886
to
a1bde27
Compare
A few code quality improvements: * Expanded docs. * Renaming of variable to align to what they are: db columns.
Reclosing this PR. Why? Discovered today that Core adds/uses a lot of dynamic properties for |
This PR aims to solve the issue with the
WP_Term::$data
dynamic property.The
WP_Term
class employs the__get
magic method to compute the object data.However, since PHP 8.2 does not support dynamic properties, it is better to eliminate this approach.
Trac ticket: https://core.trac.wordpress.org/ticket/58087
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.