| 1 |
<?php |
| 2 |
/** |
| 3 |
* Register FL Module |
| 4 |
* |
| 5 |
* Created Date: Thursday September 3rd 2020 |
| 6 |
* Author: Michael Bourne |
| 7 |
* ----- |
| 8 |
* Last Modified: Thursday, September 3rd 2020, 7:37:40 pm |
| 9 |
* Modified By: Michael Bourne |
| 10 |
* ----- |
| 11 |
* Copyright (c) 2020 URSA6 |
| 12 |
* |
| 13 |
* @package wp-commerce7 |
| 14 |
* @author Michael Bourne |
| 15 |
* @license GPL3 |
| 16 |
* @link https://ursa6.com |
| 17 |
* @since 1.1.0 |
| 18 |
*/ |
| 19 |
|
| 20 |
if ( ! defined( 'ABSPATH' ) ) { |
| 21 |
return; |
| 22 |
} |
| 23 |
|
| 24 |
class C7WP_Form extends FLBuilderModule { // phpcs:ignore |
| 25 |
public function __construct() { |
| 26 |
parent::__construct(array( |
| 27 |
'name' => __( 'Custom Form', 'wp-commerce7' ), |
| 28 |
'description' => __( 'Add a Commerce7 Custom Form to your layouts.', 'wp-commerce7' ), |
| 29 |
'category' => __( 'Commerce7', 'wp-commerce7' ), |
| 30 |
'dir' => C7WP_ROOT . '/includes/beaverbuilder/form/', |
| 31 |
'url' => C7WP_URI . 'includes/beaverbuilder/form/', |
| 32 |
'partial_refresh' => true, |
| 33 |
)); |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
FLBuilder::register_module( 'C7WP_Form', array( |
| 38 |
'c7wp-tab' => array( |
| 39 |
'title' => __( 'Settings', 'wp-commerce7' ), |
| 40 |
'sections' => array( |
| 41 |
'c7wp-section' => array( |
| 42 |
'title' => __( 'Commerce7 Content', 'wp-commerce7' ), |
| 43 |
'fields' => array( |
| 44 |
'cdata' => array( |
| 45 |
'type' => 'text', |
| 46 |
'label' => __( 'Form Slug', 'wp-commerce7' ), |
| 47 |
), |
| 48 |
), |
| 49 |
), |
| 50 |
), |
| 51 |
), |
| 52 |
) ); |