Control: Editor - 10quality/wpmvc-addon-administrator GitHub Wiki
Control used as a field type to display a text editor (based on wp_editor()
).
Usage
// Namespace and use statement...
class Settings extends Model
{
// Class properties...
protected function init()
{
// Other properties...
$this->tabs = [
'tab_id' => [
'fields' => [
'editor_field' => [
'type' => 'editor',
'title' => __( 'Text editor' ),
'description' => __( 'Editor description, this outputs <i>wp_editor()</i>.' ),
'control' => [
'media_buttons' => true,
'drag_drop_upload' => true,
'textarea_rows' => 6,
],
],
// Other fields...
],
],
];
}
}
Control options
All the editor $settings
listed here.