[wp-trac] [WordPress Trac] #22924: Add filter to theme editor accepted files
WordPress Trac
noreply at wordpress.org
Thu Dec 13 21:35:48 UTC 2012
#22924: Add filter to theme editor accepted files
-----------------------------+--------------------------
Reporter: pross | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Editor
Version: trunk | Severity: normal
Keywords: has-patch |
-----------------------------+--------------------------
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;
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22924>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list