1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace GeminiLabs\SiteReviews\Shortcodes; |
4
|
|
|
|
5
|
|
|
use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsPopup; |
6
|
|
|
|
7
|
|
|
class SiteReviewsSummaryPopup extends SiteReviewsPopup |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* @return array |
11
|
|
|
*/ |
12
|
1 |
|
public function fields() |
13
|
|
|
{ |
14
|
|
|
return [[ |
15
|
1 |
|
'html' => sprintf( '<p class="strong">%s</p>', esc_html__( 'All settings are optional.', 'site-reviews' )), |
16
|
1 |
|
'minWidth' => 320, |
17
|
1 |
|
'type' => 'container', |
18
|
|
|
],[ |
19
|
1 |
|
'label' => esc_html__( 'Title', 'site-reviews' ), |
20
|
1 |
|
'name' => 'title', |
21
|
1 |
|
'tooltip' => __( 'Enter a custom shortcode heading.', 'site-reviews' ), |
22
|
1 |
|
'type' => 'textbox', |
23
|
|
|
], |
24
|
1 |
|
$this->getTypes( __( 'Which type of review would you like to use?', 'site-reviews' )), |
25
|
1 |
|
$this->getCategories( __( 'Limit reviews to this category.', 'site-reviews' )), |
26
|
|
|
[ |
27
|
1 |
|
'label' => esc_html__( 'Assigned To', 'site-reviews' ), |
28
|
1 |
|
'name' => 'assigned_to', |
29
|
1 |
|
'tooltip' => __( 'Limit reviews to those assigned to this post ID (separate multiple IDs with a comma). You can also enter "post_id" to use the ID of the current page, or "parent_id" to use the ID of the parent page.', 'site-reviews' ), |
30
|
1 |
|
'type' => 'textbox', |
31
|
|
|
],[ |
32
|
1 |
|
'label' => esc_html__( 'Schema', 'site-reviews' ), |
33
|
1 |
|
'name' => 'schema', |
34
|
|
|
'options' => [ |
35
|
1 |
|
'true' => esc_html__( 'Enable rich snippets', 'site-reviews' ), |
36
|
1 |
|
'false' => esc_html__( 'Disable rich snippets', 'site-reviews' ), |
37
|
|
|
], |
38
|
1 |
|
'tooltip' => __( 'Rich snippets are disabled by default.', 'site-reviews' ), |
39
|
1 |
|
'type' => 'listbox', |
40
|
|
|
],[ |
41
|
1 |
|
'label' => esc_html__( 'Classes', 'site-reviews' ), |
42
|
1 |
|
'name' => 'class', |
43
|
1 |
|
'tooltip' => __( 'Add custom CSS classes to the shortcode.', 'site-reviews' ), |
44
|
1 |
|
'type' => 'textbox', |
45
|
|
|
],[ |
46
|
1 |
|
'columns' => 2, |
47
|
1 |
|
'items' => $this->getHideOptions(), |
48
|
1 |
|
'label' => esc_html__( 'Hide', 'site-reviews' ), |
49
|
1 |
|
'layout' => 'grid', |
50
|
1 |
|
'spacing' => 5, |
51
|
1 |
|
'type' => 'container', |
52
|
|
|
]]; |
53
|
|
|
} |
54
|
|
|
} |
55
|
|
|
|