_WP_Editors::parse_settings

SummerySummery

Parse default arguments for the editor instance.

Syntax

_WP_Editors::parse_settings( string $editor_id, array $settings )

ParametersParameters

$editor_id

(string) (Required) HTML ID for the textarea and TinyMCE and Quicktags instances. Should not contain square brackets.

$settings

(array) (Required) Array of editor arguments.

  • 'wpautop'
    (bool) Whether to use wpautop(). Default true.
  • 'media_buttons'
    (bool) Whether to show the Add Media/other media buttons.
  • 'default_editor'
    (string) When both TinyMCE and Quicktags are used, set which editor is shown on page load. Default empty.
  • 'drag_drop_upload'
    (bool) Whether to enable drag & drop on the editor uploading. Default false. Requires the media modal.
  • 'textarea_name'
    (string) Give the textarea a unique name here. Square brackets can be used here. Default $editor_id.
  • 'textarea_rows'
    (int) Number rows in the editor textarea. Default 20.
  • 'tabindex'
    (string|int) Tabindex value to use. Default empty.
  • 'tabfocus_elements'
    (string) The previous and next element ID to move the focus to when pressing the Tab key in TinyMCE. Default ':prev,:next'.
  • 'editor_css'
    (string) Intended for extra styles for both Visual and Text editors. Should include <style> tags, and can use "scoped". Default empty.
  • 'editor_class'
    (string) Extra classes to add to the editor textarea element. Default empty.
  • 'teeny'
    (bool) Whether to output the minimal editor config. Examples include Press This and the Comment editor. Default false.
  • 'dfw'
    (bool) Deprecated in 4.1. Unused.
  • 'tinymce'
    (bool|array) Whether to load TinyMCE. Can be used to pass settings directly to TinyMCE using an array. Default true.
  • 'quicktags'
    (bool|array) Whether to load Quicktags. Can be used to pass settings directly to Quicktags using an array. Default true.

ReturnReturn

(array) Parsed arguments array.

SourceSource

File: wp-includes/class-wp-editor.php


			

ChangelogChangelog

Changelog
Version Description
3.3.0 Introduced.
Scroll to Top