[wp-trac] [WordPress Trac] #22924: Add filter to theme editor accepted files

WordPress Trac noreply at wordpress.org
Tue Oct 13 19:40:37 UTC 2015


#22924: Add filter to theme editor accepted files
-------------------------+-----------------------------
 Reporter:  pross        |       Owner:  wonderboymusic
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  4.4
Component:  Themes       |     Version:  3.5
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------------

Comment (by DrewAPicture):

 Replying to [comment:10 pross]:
 > Replying to [comment:9 DrewAPicture]:
 > > Is the intention of the new `wp_theme_editor_filetypes` filter to make
 it possible to bring in ''arbitrary files'' or to expand the filetypes?
 Seems like based on the name alone we might be better off doing an array
 of file types then looping with `$theme->get_files()` on those types, e.g.
 >
 > Original intention was to allow users the ability to edit .less files
 that were part of a theme.
 > The theme would add 'less' to the allowed filetypes using the filter.

 Precisely. The problem is that with this hook name it implies
 ''filetypes'' not files. So if the intention is to actually filter file
 types, something closer to my solution in comment:9 would probably be
 better-suited.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/22924#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list