Add a filter for wp_editor() settings.
props DH-Shredder, JPry, DrewAPicture. fixes #24472. Built from https://develop.svn.wordpress.org/trunk@28944 git-svn-id: http://core.svn.wordpress.org/trunk@28741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
788597141a
commit
63b1667a01
|
@ -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' => '',
|
||||
|
|
Loading…
Reference in New Issue