form-shortcode.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Shortcodes; |
| 5 | |
| 6 | class Form_Shortcode extends Shortcode { |
| 7 | |
| 8 | /** |
| 9 | * @return mixed |
| 10 | */ |
| 11 | public function get_name() { |
| 12 | return 'jet_fb_form'; |
| 13 | } |
| 14 | |
| 15 | public function default_args() { |
| 16 | return $this->prepare_attributes( |
| 17 | jet_form_builder()->blocks->get_form_class()->get_attributes() |
| 18 | ); |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * @param $settings |
| 23 | * |
| 24 | * @return mixed |
| 25 | */ |
| 26 | public function generate( $settings ) { |
| 27 | return jet_fb_render_form( $settings ); |
| 28 | } |
| 29 | |
| 30 | |
| 31 | } |
| 32 |