class-wpml-beaver-builder-pricing-table.php
1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
class WPML_Beaver_Builder_Pricing_Table extends WPML_Beaver_Builder_Module_With_Items {
public function &get_items( $settings ) {
return $settings->pricing_columns;
}
public function get_fields() {
return array( 'title', 'button_text', 'button_url', 'features', 'price', 'duration' );
}
protected function get_title( $field ) {
switch ( $field ) {
case 'title':
return esc_html__( 'Pricing table: Title', 'sitepress' );
case 'button_text':
return esc_html__( 'Pricing table: Button text', 'sitepress' );
case 'button_url':
return esc_html__( 'Pricing table: Button link', 'sitepress' );
case 'features':
return esc_html__( 'Pricing table: Feature', 'sitepress' );
case 'price':
return esc_html__( 'Pricing table: Price', 'sitepress' );
case 'duration':
return esc_html__( 'Pricing table: Duration', 'sitepress' );
default:
return '';
}
}
protected function get_editor_type( $field ) {
switch ( $field ) {
case 'title':
case 'button_text':
case 'price':
case 'duration':
return 'LINE';
case 'button_url':
return 'LINK';
case 'features':
return 'VISUAL';
default:
return '';
}
}
}