TIL: Defining a default value within register_post_meta drives you crazy if you no more aware of that you did it. It still persists, even if it is not in the database or the object cache.
Found out around an hour later … 🥲
TIL: Defining a default value within register_post_meta drives you crazy if you no more aware of that you did it. It still persists, even if it is not in the database or the object cache.
Found out around an hour later … 🥲
Author:
As a developer, I work with WordPress every day. By day, I create plugins and themes, solve problems and sometimes produce new ones. At night, it’s not unusual to find me at the WordPress Meetup in Stuttgart with my dog. 🐕
@matze Feel with you
@matze post meta defaults are fun … https://core.trac.wordpress.org/ticket/55600 … not
This isn’t yet merged into core, isn’t it? I cannot stop the feeling to not use a default metadata value anymore in the future whatsoever and handle a default differently by checking get_post_meta for false instead.
Leave a Reply