Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #61950, comment 2


Ignore:
Timestamp:
08/28/2024 11:12:39 PM (10 months ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #61950, comment 2

    initial v1  
    1111Yea, don't think anything else can be done at this point. I actually tried to make options saving and retrieving to respect data types, but at the end there were too many edge cases that it became risky and not practical.
    1212
    13 A good docblock update for the different meta fields (post, comment, user, site, etc.) would include the full description about what's going on, and probably mention that the unexpected types can be avoided at the cost of a tiny bit more processing if the data is serialized. JSON encoding would also work in most cases, but may behave a bit unexpectedly when differentiating between objects and associative arrays.
     13A good docblock update for the different meta retrieval functions (post, comment, user, site, etc.) would include the full description about what's going on, and probably mention that the unexpected types can be avoided at the cost of a tiny bit more processing if the data is serialized. JSON encoding would also work in most cases, but may behave a bit unexpectedly when differentiating between objects and associative arrays.