html.php 1.1 KB

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