Underscores get stripped out in $type ( get_query_template() )
|Reported by:||rinatkhaziev||Owned by:|
What happens is:
$type = preg_replace( '|[^a-z0-9-]+|', '', $type );
strips underscore. Effectively, incoming "front_page" becomes frontpage, which leads to not working (but documented) hook front_page_template.
I tested this on: nginx 1.2.1/php-fpm 5.4.3 (homebrew macos) and nginx 1.0/php-fpm 5.3.3 with the latest revision ATM
The fix is as simple as
$type = preg_replace( '|[^a-z0-9-_]+|', '', $type );
Patch is attached.
Change History (12)
comment:3 in reply to: ↑ 2 rinatkhaziev — 21 months ago
comment:4 SergeyBiryukov — 15 months ago
- Milestone changed from Awaiting Review to 3.6
- Version changed from 3.4.1 to 2.5