apply_filters( 'wp_theme_editor_filetypes', string[] $default_types, WP_Theme $theme )
- Since
- 4.4.0
Filters the list of file types allowed for editing in the theme file editor.
Compatibility
- WordPress
- since 4.4.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$default_typesstring[]- An array of editable theme file extensions.
$themeWP_Theme- The active theme object.
Where this hook fires · 1
wp-admin/includes/file.php:298wp_get_theme_file_editable_extensions()
Source code
* * @since 4.4.0 * * @param string[] $default_types An array of editable theme file extensions. * @param WP_Theme $theme The active theme object. */ $file_types = apply_filters( 'wp_theme_editor_filetypes', $default_types, $theme ); // Ensure that default types are still there. return array_unique( array_merge( $file_types, $default_types ) );} /**Changelog
Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.