Introduce exclusion for WP_Theme::scandir()
|Reported by:||lukasbesch||Owned by:||rachelbaker|
I am using NPM to manage my theme's dependencies during development and ran into the following issue where accessing wp-admin/edit.php?post_type=page returned an empty response. Tracing it down I found out that WordPress is looking for possible page templates in the theme directory. Scanning the node_modules folder is probably too much a server can handle.
To solve this problem I suggest to introduce an exclusion list so theme developers can add directories (and files) that will be ignored when searching for post templates. I am not aware of any disadvantages of this solution and don't exactly know where the function is used elsewhere.
Change History (17)
6 weeks ago
- Keywords fixed-major added; needs-testing removed
- Resolution fixed deleted
- Status changed from closed to reopened