1 <?php
2 3 4 5 6 7 8 9 10
11 namespace uix\ui\control;
12
13 14 15 16 17
18 class editor extends \uix\ui\control\textarea{
19
20 21 22 23 24 25 26
27 public $type = 'editor';
28
29 30 31 32 33 34 35
36 public function input(){
37
38 $settings = array( 'textarea_name' => $this->name() );
39 if( !empty( $this->struct['settings'] ) && is_array( $this->struct['settings'] ) )
40 $settings = array_merge( $this->struct['settings'], $settings );
41
42 ob_start();
43
44 wp_editor( $this->get_value(), 'control-' . $this->id(), $settings );
45
46 return ob_get_clean();
47
48 }
49
50 }