1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace GeminiLabs\SiteReviews\Integrations\FusionBuilder; |
4
|
|
|
|
5
|
|
|
use GeminiLabs\SiteReviews\Shortcodes\SiteReviewShortcode; |
6
|
|
|
|
7
|
|
|
class FusionSiteReview extends FusionElement |
8
|
|
|
{ |
9
|
|
|
public static function elementParameters(): array |
10
|
|
|
{ |
11
|
|
|
return [ |
12
|
|
|
'post_id' => [ |
13
|
|
|
'heading' => esc_attr_x('Review Post ID', 'admin-text', 'site-reviews'), |
14
|
|
|
'param_name' => 'post_id', |
15
|
|
|
'type' => 'textfield', |
16
|
|
|
'value' => '', |
17
|
|
|
], |
18
|
|
|
'hide' => [ |
19
|
|
|
'default' => '', |
20
|
|
|
'heading' => esc_html_x('Hide Fields', 'admin-text', 'site-reviews'), |
21
|
|
|
'param_name' => 'hide', |
22
|
|
|
'placeholder_text' => esc_attr_x('Select Fields to Hide', 'admin-text', 'site-reviews'), |
23
|
|
|
'type' => 'multiple_select', |
24
|
|
|
'value' => glsr(static::shortcodeClass())->options('hide'), |
25
|
|
|
], |
26
|
|
|
'class' => [ |
27
|
|
|
'heading' => esc_attr_x('CSS Class', 'admin-text', 'site-reviews'), |
28
|
|
|
'description' => esc_attr_x('Add a class to the wrapping HTML element.', 'admin-text', 'site-reviews'), |
29
|
|
|
'param_name' => 'class', |
30
|
|
|
'type' => 'textfield', |
31
|
|
|
'value' => '', |
32
|
|
|
], |
33
|
|
|
'id' => [ |
34
|
|
|
'heading' => esc_attr_x('CSS ID', 'admin-text', 'site-reviews'), |
35
|
|
|
'description' => esc_attr_x('Add an ID to the wrapping HTML element.', 'admin-text', 'site-reviews'), |
36
|
|
|
'param_name' => 'id', |
37
|
|
|
'type' => 'textfield', |
38
|
|
|
'value' => '', |
39
|
|
|
], |
40
|
|
|
]; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
public static function shortcodeClass(): string |
44
|
|
|
{ |
45
|
|
|
return SiteReviewShortcode::class; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
protected static function shortcodeIcon(): string |
49
|
|
|
{ |
50
|
|
|
return 'fusion-glsr-review'; |
51
|
|
|
} |
52
|
|
|
} |
53
|
|
|
|