[wp-trac] [WordPress Trac] #62646: PHP Warning in REST API when post_type doesn't support post-formats, but a post-format filter is applied.
WordPress Trac
noreply at wordpress.org
Thu Dec 5 04:18:29 UTC 2024
#62646: PHP Warning in REST API when post_type doesn't support post-formats, but a
post-format filter is applied.
--------------------------+------------------------------
Reporter: dd32 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 6.7
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Comment (by yogeshbhutkar):
Hi @dd32, thank you for raising the ticket. I’ve taken a slightly
different approach to address the issue. In cases where the post-formats
feature itself is not supported, I believe it would be more effective to
display an error message to the user, similar to the handling we have when
the value provided in the formats parameter is not registered. This
approach would help users identify the limitation more clearly, enabling
them to update either the endpoint or the respective format support as
needed, rather than encountering unexpected data. I’d appreciate hearing
your thoughts on this approach.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62646#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list