[wp-trac] [WordPress Trac] #54339: unique $keys array when add custom key from Several places with postmeta_form_keys
WordPress Trac
noreply at wordpress.org
Thu Aug 1 17:01:23 UTC 2024
#54339: unique $keys array when add custom key from Several places with
postmeta_form_keys
--------------------------------+------------------------------
Reporter: myousefi08 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: 5.8.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: administration
--------------------------------+------------------------------
Changes (by desrosj):
* keywords: => reporter-feedback
* component: General => Options, Meta APIs
Comment:
Hi @myousefi08 and welcome to Trac!
My apologies that it took so long to receive a response.
To make sure I understand the report. You're saying you have a filter in
both your plugin and theme that adds two identical meta keys to the list
of keys to display using `postmeta_form_keys`?
If that's the case, that should not result in duplicates. They should be
filtered out since the meta query performed includes `DISTINCT`. If this
is what you're seeing, could you please provide some more details and
maybe a code snippet that another contributor could use to reproduce the
problem?
I'm marking as this a `close` candidate with a `worksforme` resolution
because I've been unable to reproduce the report as I understand it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54339#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list