[wp-trac] [WordPress Trac] #39232: REST API: Can't set existing post format if theme does not support it (2)
WordPress Trac
noreply at wordpress.org
Fri Jan 20 22:29:09 UTC 2017
#39232: REST API: Can't set existing post format if theme does not support it (2)
-------------------------------------------------+-------------------------
Reporter: iseulde | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: REST API | Review
Severity: normal | Version: 4.7
Keywords: has-patch 2nd-opinion has-unit- | Resolution:
tests | Focuses:
-------------------------------------------------+-------------------------
Comment (by davidakennedy):
Replying to [comment:9 jnylen0]:
> > Themes aren't supposed to add their own custom post formats.
>
> I wasn't aware of this, but on its own isn't a good enough reason to
remove support.
>
> Do themes add post formats anyway? I'm not sure; we'll need someone
who's more familiar with this feature to weigh in.
Responding to the post in Core Themes Slack.
Themes cannot add "custom" post formats. See:
https://codex.wordpress.org/Post_Formats
> New formats cannot be introduced by themes or even plugins.
As for point two in [comment:2]:
> Additionally allow the current post format to be set, even if the theme
does not support it. This should be a no-op.
I'd say I agree with this:
> But a post_format not used by the current theme, but supported by core
is not a wrong/broken piece of information. It's just not used at this
point in time.
Because if you use post formats and switch themes, that data – what format
it is still exists. A theme declaring it is just the theme's decision
because it's usually connected to a front end display difference.
But I can imagine API clients wanting to set and show that data
differently. To some degree, they could be "themes" in a loose sense, as
in not a traditional WordPress theme, but still wanting to use that data
in a creative way.
That's just my take. Let me know if I missed anything, or you need
anything else.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39232#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list