[wp-trac] [WordPress Trac] #38292: Introduce exclusion for WP_Theme::scandir()
WordPress Trac
noreply at wordpress.org
Wed Oct 12 11:47:02 UTC 2016
#38292: Introduce exclusion for WP_Theme::scandir()
-----------------------------------------+-----------------------------
Reporter: lukasbesch | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 4.6.1
Severity: normal | Keywords:
Focuses: administration, performance |
-----------------------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38292>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list