wphooks.info - wp_theme_editor_filetypes

wp_theme_editor_filetypes

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-admin/includes/file.php:
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
	);

	/**
	 * Filters the list of file types allowed for editing in the Theme editor.
	 *
	 * @since 4.4.0
	 *
	 * @param string[] $default_types List of allowed file types.
	 * @param WP_Theme $theme         The current 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 ) );
}

/**
 * Print file editor templates (for plugins and themes).
 *
 * @since 4.9.0