[wp-trac] [WordPress Trac] #62748: Return results of update_post_meta
WordPress Trac
noreply at wordpress.org
Mon Jan 6 12:21:09 UTC 2025
#62748: Return results of update_post_meta
--------------------------------+------------------------------
Reporter: vahan889 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------------+------------------------------
Comment (by vineet2003):
I propose adding an optional $return_detailed parameter to the
update_post_meta function. By default, it would retain the current
behavior to ensure backward compatibility (false for failure or no change,
true for success). When $return_detailed is set to true, the function
could return a detailed array with a status and reason field, clearly
distinguishing between failure, no change, and successful updates. This
way, developers can opt into the enhanced feedback while existing
implementations remain unaffected.
CC - @SergeyBiryukov @vahan889
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62748#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list