html.php
48 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @class FLHtmlModule |
| 5 | */ |
| 6 | class FLHtmlModule extends FLBuilderModule { |
| 7 | |
| 8 | /** |
| 9 | * @method __construct |
| 10 | */ |
| 11 | public function __construct() { |
| 12 | parent::__construct(array( |
| 13 | 'name' => __( 'HTML', 'fl-builder' ), |
| 14 | 'description' => __( 'Display raw HTML code.', 'fl-builder' ), |
| 15 | 'category' => __( 'Basic', 'fl-builder' ), |
| 16 | 'partial_refresh' => true, |
| 17 | 'icon' => 'editor-code.svg', |
| 18 | )); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * Register the module and its form settings. |
| 24 | */ |
| 25 | FLBuilder::register_module('FLHtmlModule', array( |
| 26 | 'general' => array( |
| 27 | 'title' => __( 'General', 'fl-builder' ), |
| 28 | 'sections' => array( |
| 29 | 'general' => array( |
| 30 | 'title' => '', |
| 31 | 'fields' => array( |
| 32 | 'html' => array( |
| 33 | 'type' => 'code', |
| 34 | 'editor' => 'html', |
| 35 | 'label' => '', |
| 36 | 'rows' => '18', |
| 37 | 'preview' => array( |
| 38 | 'type' => 'text', |
| 39 | 'selector' => '.fl-html', |
| 40 | ), |
| 41 | 'connections' => array( 'html', 'string', 'url' ), |
| 42 | ), |
| 43 | ), |
| 44 | ), |
| 45 | ), |
| 46 | ), |
| 47 | )); |
| 48 |