Opened 6 months ago
Last modified 4 months ago
#22924 new enhancement
Add filter to theme editor accepted files
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Editor | Version: | 3.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | mdhansen@… |
Description
Proposing adding a filter to theme-editor.php so theme authors can add to the list of files that are editable. ie html/less/js files.
Hers an example of what could be possible:
add_filter( 'wp_theme_editor_filetypes', 'add_my_filetype', 10, 2 );
function add_my_filetype( $allowed_types, $theme ) {
$extra = $theme->get_files( 'less', 1 );
return $allowed_types += $extra;
}
Attachments (1)
Change History (4)
comment:1
SergeyBiryukov
— 6 months ago
- Version changed from trunk to 3.5
comment:2
MikeHansenMe
— 4 months ago
- Cc mdhansen@… added
- Type changed from defect (bug) to enhancement
comment:3
SergeyBiryukov
— 4 months ago
Related: #6531
Note: See
TracTickets for help on using
tickets.
Created a test.less file in my theme, added the patch and example. It worked great, I think this would be a good addition.