wphooks.info - editable_extensions

editable_extensions

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-admin/includes/file.php:
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
	/**
	 * 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;
}

/**
 * Get list of file extensions that are editable for a given theme.
 *
 * @param WP_Theme $theme Theme.
 * @return array File extensions.