1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace GeminiLabs\SiteReviews\Integrations\WPBakery; |
4
|
|
|
|
5
|
|
|
use GeminiLabs\SiteReviews\Shortcodes\SiteReviewShortcode; |
6
|
|
|
|
7
|
|
|
class VcSiteReview extends VcShortcode |
8
|
|
|
{ |
9
|
|
|
public static function vcShortcodeClass(): string |
10
|
|
|
{ |
11
|
|
|
return SiteReviewShortcode::class; |
12
|
|
|
} |
13
|
|
|
|
14
|
|
|
public static function vcShortcodeIcon(): string |
15
|
|
|
{ |
16
|
|
|
return glsr()->url('assets/images/icons/wpbakery/wpbakery-review.svg'); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
public static function vcShortcodeSettings(): array |
20
|
|
|
{ |
21
|
|
|
return [ |
22
|
|
|
'post_id' => [ |
23
|
|
|
'type' => 'autocomplete', |
24
|
|
|
'heading' => esc_html_x('Review ID', 'admin-text', 'site-reviews'), |
25
|
|
|
'description' => esc_html_x('Enter the Post ID of the review you want to display.', 'admin-text', 'site-reviews'), |
26
|
|
|
'param_name' => 'post_id', |
27
|
|
|
'save_always' => true, |
28
|
|
|
], |
29
|
|
|
'hide' => [ |
30
|
|
|
'type' => 'checkbox', |
31
|
|
|
'heading' => esc_html_x('Hide Options', 'admin-text', 'site-reviews'), |
32
|
|
|
'value' => array_flip(static::vcShortcode()->getHideOptions()), |
33
|
|
|
'param_name' => 'hide', |
34
|
|
|
], |
35
|
|
|
'id' => [ |
36
|
|
|
'type' => 'textfield', |
37
|
|
|
'heading' => esc_html_x('Custom ID', 'admin-text', 'site-reviews'), |
38
|
|
|
'description' => esc_html_x('This should be a unique value.', 'admin-text', 'site-reviews'), |
39
|
|
|
'param_name' => 'id', |
40
|
|
|
'group' => esc_html_x('Advanced', 'admin-text', 'site-reviews'), |
41
|
|
|
], |
42
|
|
|
'class' => [ |
43
|
|
|
'type' => 'textfield', |
44
|
|
|
'heading' => esc_html_x('Additional CSS classes', 'admin-text', 'site-reviews'), |
45
|
|
|
'description' => esc_html_x('Separate multiple classes with spaces.', 'admin-text', 'site-reviews'), |
46
|
|
|
'param_name' => 'class', |
47
|
|
|
'group' => esc_html_x('Advanced', 'admin-text', 'site-reviews'), |
48
|
|
|
], |
49
|
|
|
]; |
50
|
|
|
} |
51
|
|
|
} |
52
|
|
|
|