Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #61890, comment 4


Ignore:
Timestamp:
08/21/2024 05:39:26 PM (4 months ago)
Author:
hellofromTonya
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #61890, comment 4

    initial v1  
    11What's the current behavior?
    22
    3 See it in action https://3v4l.org/6F0nJ#veol.
     3See it in action https://3v4l.org/3GnAK#veol.
    44
    55Current behavior with known and unknown dynamic properties:
     
    77* ✅ get, isset, set, unset of unknown dynamic property works.
    88* ✅ `WP_Term::$data` is initialized on get and is not included when using `WP_Term::to_array()` or `(array) $term`.
    9 * ✅ `WP_Term::to_array()` returns the declared properties and all dynamic properties.
     9* ✅ `WP_Term::to_array()` returns the declared properties and all dynamic properties. For example, the `link` and `unknown` dynamic properties in the test code were both included in the array.
    1010* ✅ Same results when converting object to array via `WP_Term::to_array()` and `(array) $term`.
    1111* No deprecation notices are thrown.