Post Formats: admin UI + fallbacks for themes that don't support them
|Reported by:||alexkingorg||Owned by:|
|Severity:||normal||Keywords:||has-patch ui-feedback needs-codex|
|Cc:||ocean90, nacin, iandstewart, xoodrew@…, dromsey@…, mcgaritydotme, joachim.kudish@…, 21cdb, downstairsdev, georgemamadashvili@…, justin@…, brad@…, beau@…, melissachoyce@…, mercijavier@…, bronson@…, jared@…, slobodanmanic, dh-shredder, lessbloat, sabreuse, apeatling@…, rachelbaker, synapticism, jeremy+wp@…, justin@…, fittingsites@…, coenjacobs, kwight@…, lancewillett, hchouhan, justin@…, kelly.dwan@…, saltcod@…, nashwan.doaqan@…|
There are several custom fields provided to put various bits of data into structured fields, allowing for custom output of those fields in a theme.
Note that the URL field is separate for Link formats so that URL will not be included in pingbacks until #18506 is accepted.
Creating structured data to support post formats makes them more powerful and allows themes to do more with them, but it also causes a potential backward compatibility problem for users that change to a theme that doesn't support post formats. To solve this problem, the following code can be used:
This looks at custom field data and the current theme's post format support, and where appropriate adds content to the post body.
For now I've kept the code in GitHub instead of attaching it here, so that pull requests can be created easily.
There was a great response to this from the community when we released it, so hopefully it can be considered for inclusion in core.
Change History (202)
comment:38 helen — 10 months ago
- Keywords has-patch needs-testing added; needs-patch removed