Add a filter for wp_editor() settings.

props DH-Shredder, JPry, DrewAPicture.
fixes #24472.

git-svn-id: https://develop.svn.wordpress.org/trunk@28944 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-07-01 23:02:58 +00:00
parent 9ab7f4b144
commit 44f1a76a85

View File

@ -62,7 +62,20 @@ final class _WP_Editors {
* @return array Parsed arguments array.
*/
public static function parse_settings( $editor_id, $settings ) {
$set = wp_parse_args( $settings, array(
/**
* Filter the wp_editor() settings.
*
* @since 4.0.0
*
* @see _WP_Editors()::parse_settings()
*
* @param array $settings Array of editor arguments.
* @param string $editor_id ID for the current editor instance.
*/
$defaults = apply_filters( 'wp_editor_settings', $settings, $editor_id );
$set = wp_parse_args( $settings, array(
'wpautop' => true,
'media_buttons' => true,
'default_editor' => '',