[wp-trac] [WordPress Trac] #37655: [Template Hierarchy] category-slug.php cannot be properly loaded when slug is not English
WordPress Trac
noreply at wordpress.org
Fri Aug 26 20:37:41 UTC 2016
#37655: [Template Hierarchy] category-slug.php cannot be properly loaded when slug
is not English
----------------------------------------+--------------------------
Reporter: withgjr | Owner: johnbillion
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.7
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: template
----------------------------------------+--------------------------
Comment (by johnbillion):
[attachment:37655.2.diff] introduces the decoded form of template file
names as an extra, higher-priority entry within the template hierarchy.
This means that existing templates that use the URL-encoded form of the
template name will continue to work.
Example:
Given a page with a slug of `測試`, the page template hierarchy now looks
like:
1. `page-測試.php`
2. `page-%e6%b8%ac%e8%a9%a6.php`
3. `page-123.php`
4. `page.php`
5. `singular.php`
6. `index.php`
This applies to category archives, tag archives, taxonomy term archives,
pages, and posts.
Tests are a work in progress and are dependent on #14310 which I hope to
get in soon.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37655#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list