Test Failed
Push — hotfix/fix-counts ( e9420b...4803a6 )
by Paul
05:49
created

SiteReviewsSummaryPopup   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 32
c 0
b 0
f 0
dl 0
loc 45
ccs 0
cts 30
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A fields() 0 40 1
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
	public function fields()
13
	{
14
		return [[
15
			'html' => sprintf( '<p class="strong">%s</p>', esc_html__( 'All settings are optional.', 'site-reviews' )),
16
			'minWidth' => 320,
17
			'type' => 'container',
18
		],[
19
			'label' => esc_html__( 'Title', 'site-reviews' ),
20
			'name' => 'title',
21
			'tooltip' => __( 'Enter a custom shortcode heading.', 'site-reviews' ),
22
			'type' => 'textbox',
23
		],
24
		$this->getTypes( __( 'Which type of review would you like to use?', 'site-reviews' )),
25
		$this->getCategories( __( 'Limit reviews to this category.', 'site-reviews' )),
26
		[
27
			'label' => esc_html__( 'Assigned To', 'site-reviews' ),
28
			'name' => 'assigned_to',
29
			'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
			'type' => 'textbox',
31
		],[
32
			'label' => esc_html__( 'Schema', 'site-reviews' ),
33
			'name' => 'schema',
34
			'options' => [
35
				'true' => esc_html__( 'Enable rich snippets', 'site-reviews' ),
36
				'false' => esc_html__( 'Disable rich snippets', 'site-reviews' ),
37
			],
38
			'tooltip' => __( 'Rich snippets are disabled by default.', 'site-reviews' ),
39
			'type' => 'listbox',
40
		],[
41
			'label' => esc_html__( 'Classes', 'site-reviews' ),
42
			'name' => 'class',
43
			'tooltip' => __( 'Add custom CSS classes to the shortcode.', 'site-reviews' ),
44
			'type' => 'textbox',
45
		],[
46
			'columns' => 2,
47
			'items' => $this->getHideOptions(),
48
			'label' => esc_html__( 'Hide', 'site-reviews' ),
49
			'layout' => 'grid',
50
			'spacing' => 5,
51
			'type' => 'container',
52
		]];
53
	}
54
}
55