editable_extensions WordPress Filter Hook

The editable_extensions Wordpress hook allows you to add or remove file extensions that can be edited within the Wordpress editor. This can be useful if you want to add support for a new file type or remove support for an existing file type.

apply_filters( 'editable_extensions', string[] $default_types, string $plugin ) #

Filters the list of file types allowed for editing in the plugin file editor.


Parameters

$default_types

(string[])An array of editable plugin file extensions.

$plugin

(string)Path to the plugin file relative to the plugins directory.


Top ↑

Source

File: wp-admin/includes/file.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.9.0Added the $plugin parameter.
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.