wp_get_plugin_file_editable_extensions( string $plugin )

Get list of file extensions that are editable in plugins.

Description Description

Parameters Parameters


(string) (Required) Plugin.

Top ↑

Return Return

(array) File extensions.

Top ↑

Source Source

File: wp-admin/includes/file.php

function wp_get_plugin_file_editable_extensions( $plugin ) {

	$editable_extensions = array(

	 * Filters file type extensions editable in the plugin editor.
	 * @since 2.8.0
	 * @since 4.9.0 Adds $plugin param.
	 * @param string $plugin Plugin file.
	 * @param array $editable_extensions An array of editable plugin file extensions.
	$editable_extensions = (array) apply_filters( 'editable_extensions', $editable_extensions, $plugin );

	return $editable_extensions;

Top ↑

Changelog Changelog

Version Description
4.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.