[wp-trac] [WordPress Trac] #41717: WP_Theme::get_post_templates() fails to read parent theme
WordPress Trac
noreply at wordpress.org
Wed Aug 23 20:47:32 UTC 2017
#41717: WP_Theme::get_post_templates() fails to read parent theme
------------------------------+------------------------------
Reporter: JoelStransky | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 4.7
Severity: normal | Resolution:
Keywords: needs-unit-tests | Focuses:
------------------------------+------------------------------
Changes (by swissspidy):
* keywords: => needs-unit-tests
* focuses: administration, template =>
* component: Posts, Post Types => Themes
* version: 4.8.1 => 4.7
Comment:
That line is correct as is. It checks the current theme.
The `get_page_templates()` method calls `get_post_templates()` for the
current theme and then the parent theme, if it exists. See
https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/class-wp-
theme.php?marks=1101-1103#L1100.
I'm not sure if this behaviour actually changed in 4.7 or not, but it
could definitely benefit from some unit tests.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41717#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list