[wp-trac] [WordPress Trac] #42855: Add ability to filter header, sidebar, searchform, footer and template_part file paths
WordPress Trac
noreply at wordpress.org
Tue Feb 27 22:25:15 UTC 2018
#42855: Add ability to filter header, sidebar, searchform, footer and template_part
file paths
------------------------------+------------------------------
Reporter: atanasangelovdev | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: template
------------------------------+------------------------------
Comment (by MikeSchinkel):
Replying to [comment:6 joyously]:
There are many reasons for what @atanasangelovdev is suggesting that your
replies do not anticipate. For example:
1. Support for alternate output based on Google AMP and similar
technologies. A plugin could capture the header call, set `ob_start()`,
run the theme's header, grab its output with `ob_get_clean()`, clean up
the header to be valid AMP, then output it. A plugin could do the same
with the footer and with all partials.
2. Support for alternate output such as JSON. A plugin could to the same
above but generate JSON output instead when a URL parameter `?json` is
added.
3. Support for testing using similar techniques to above "unit test" a
header, a footer, or a partial.
4. Output comments to annotate a theme using similar techniques to above
for a plugin to specify which header, sidebars and footer were called.
As the web becomes more complicated, the lack of this type of
functionality is hamstringing WordPress from being able to be used in
contexts that are beyond the simple ''"Outputting blog posts for people to
view via a desktop browser."'' This aspect of WordPress is still in the
aughts.
I really wish the people blocking these types of improvements had worked
on some of these use-cases to appreciate how limiting these missing bits
of control can be.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42855#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list