PluginProbe
MotoPress Hotel Booking for Divi / 1.0.6
MotoPress Hotel Booking for Divi v1.0.6
trunk 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.0 2.0.0
mphb-divi / includes / modules / mphb-checkout / mphb-checkout.php

mphb-checkout.php in MotoPress Hotel Booking for Divi 1.0.6, at includes/modules/mphb-checkout/mphb-checkout.php

52 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if(!class_exists('MPHB_Divi_Checkout_Module') && class_exists('ET_Builder_Module')):
3
4 class MPHB_Divi_Checkout_Module extends ET_Builder_Module{
5
6 public $slug = 'mphb-divi-checkout';
7 public $vb_support = 'off';
8
9 function init() {
10
11 $this->name = esc_html__( 'HB Accom. Checkout', 'mphb-divi' );
12
13 }
14
15 function get_fields() {
16
17 return array(
18 'class' => array(
19 'label' => esc_html__( 'Class', 'mphb-divi' ),
20 'description' => esc_html__( 'Custom CSS class for shortcode wrapper.', 'mphb-divi' ),
21 'type' => 'text',
22 'default' => ''
23 ),
24 );
25
26 }
27
28 function render($attrs, $content = null, $render_slug){
29
30 return self::get_checkout($this->props);
31
32 }
33
34
35 static function get_checkout($args = array()){
36
37 $defaults = array(
38 'class' => ''
39 );
40
41 $args = wp_parse_args($args, $defaults);
42
43 return do_shortcode('[mphb_checkout class="'.$args['class'].'"]');
44
45 }
46
47 }
48
49 new MPHB_Divi_Checkout_Module;
50
51 endif;
52