[wp-trac] [WordPress Trac] #58087: Fix the 'data' dynamic property in WP_Term
WordPress Trac
noreply at wordpress.org
Tue Apr 30 19:46:44 UTC 2024
#58087: Fix the 'data' dynamic property in WP_Term
-------------------------------------+-------------------------------------
Reporter: antonvlasenko | Owner: hellofromTonya
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.6
Component: Taxonomy | Version: 6.3
Severity: minor | Resolution:
Keywords: php82 needs-testing | Focuses: coding-standards, php-
has-patch has-unit-tests changes- | compatibility
requested early |
-------------------------------------+-------------------------------------
Comment (by antonvlasenko):
I've submitted a new [https://github.com/WordPress/wordpress-
develop/pull/6426 PR] that partially implements @hellofromTonya 's
[https://core.trac.wordpress.org/ticket/60875 proposal].
However, I decided to not add a private property to the `WP_Term`.
The rationale for this decision is outlined in
https://core.trac.wordpress.org/ticket/60875#comment:1.
Another reason for not adding a private property was risk of breaking
plugins that cast an `WP_Term` object to an array:
https://www.wpdirectory.net/search/01HWR887XBHDYRN6G0E7N0SVZA
Moreover, this new [https://github.com/WordPress/wordpress-
develop/pull/6426 PR] incorporates the suggestion mentioned in
https://core.trac.wordpress.org/ticket/56034#comment:70.
I'd be grateful for any kind of feedback.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58087#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list