[wp-trac] [WordPress Trac] #58905: Ensure locate_template only loads theme files
WordPress Trac
noreply at wordpress.org
Wed May 7 16:29:01 UTC 2025
#58905: Ensure locate_template only loads theme files
-------------------------------------------------+-------------------------
Reporter: jorbin | Owner: jorbin
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.9
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: has-patch early has-unit-tests | Focuses:
needs-dev-note changes-requested has-test- |
info |
-------------------------------------------------+-------------------------
Changes (by SirLouen):
* keywords: has-patch early needs-testing-info has-unit-tests needs-dev-
note =>
has-patch early has-unit-tests needs-dev-note changes-requested has-
test-info
Comment:
== Combined Bug Reproduction and Patch Test Report
=== Description
❌ This report can't validate that the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-
develop/pull/6502.diff
=== Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.4.6
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.4.6)
- Browser: Chrome 136.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
* Test Reports 1.2.0
=== Bug Reproduction Steps
1. Create a dummy Theme
2. Make sure it has at least the files: `style.css` and `index.php`. Check
a Basic Theme example here: https://developer.wordpress.org/themes
/classic-themes/your-first-theme/#classic-theme
3. Create another file inside the theme directory called `test-non-
template.txt`
4. Install this plugin https://raw.githubusercontent.com/SirLouen/testing-
template-loading/refs/tags/Second-Version/testing-template-loading.php
5. Create a new Post and add the short code to see the results:
`[test_locate_template]`
6. 🐞Bug reproduced: Wrongly loaded non-template file
=== Actual Results with Patch
1. ❌ Issue is not resolved with the patch.
=== Additional Comments
If there are any concerns, please review the plugin for further testing.
=== Supplemental Artifacts
Link to the testing plugin repo: https://github.com/SirLouen/testing-
template-loading/
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58905#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list