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

SiteReviewsFormPopup   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 33
c 0
b 0
f 0
dl 0
loc 46
ccs 0
cts 28
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A fields() 0 41 1
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Shortcodes;
4
5
use GeminiLabs\SiteReviews\Database;
6
use GeminiLabs\SiteReviews\Shortcodes\TinymcePopupGenerator;
7
8
class SiteReviewsFormPopup extends TinymcePopupGenerator
9
{
10
	/**
11
	 * @return array
12
	 */
13
	public function fields()
14
	{
15
		return [[
16
			'type' => 'container',
17
			'html' => '<p class="strong">'.esc_html__( 'All settings are optional.', 'site-reviews' ).'</p>',
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
			'label' => esc_html__( 'Description', 'site-reviews' ),
25
			'minHeight' => 60,
26
			'minWidth' => 240,
27
			'multiline' => true,
28
			'name' => 'description',
29
			'tooltip' => __( 'Enter a custom shortcode description.', 'site-reviews' ),
30
			'type' => 'textbox',
31
		],
32
		$this->getCategories( __( 'Automatically assign a category to reviews submitted with this shortcode.', 'site-reviews' )),
33
		[
34
			'label' => esc_html__( 'Assign To', 'site-reviews' ),
35
			'name' => 'assign_to',
36
			'tooltip' => __( 'Assign submitted reviews to a custom page/post ID. You can also enter "post_id" to assign reviews to the ID of the current page.', 'site-reviews' ),
37
			'type' => 'textbox',
38
		],[
39
			'label' => esc_html__( 'Classes', 'site-reviews' ),
40
			'name' => 'class',
41
			'tooltip' => __( 'Add custom CSS classes to the shortcode.', 'site-reviews' ),
42
			'type' => 'textbox',
43
		],[
44
			'columns' => 2,
45
			'items' => $this->getHideOptions(),
46
			'label' => esc_html__( 'Hide', 'site-reviews' ),
47
			'layout' => 'grid',
48
			'spacing' => 5,
49
			'type' => 'container',
50
		],[
51
			'hidden' => true,
52
			'name' => 'id',
53
			'type' => 'textbox',
54
		]];
55
	}
56
}
57