Completed
Pull Request — master (#605)
by Zack
05:45
created
includes/fields/class-gravityview-field-website.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
 
8 8
 	var $name = 'website';
9 9
 
10
-	var $search_operators = array( 'is', 'isnot', 'contains', 'starts_with', 'ends_with' );
10
+	var $search_operators = array('is', 'isnot', 'contains', 'starts_with', 'ends_with');
11 11
 
12 12
 	var $_gf_field_class_name = 'GF_Field_Website';
13 13
 
14 14
 	var $group = 'advanced';
15 15
 
16
-	function field_options( $field_options, $template_id = '', $field_id = '', $context = '', $input_type = '' ) {
16
+	function field_options($field_options, $template_id = '', $field_id = '', $context = '', $input_type = '') {
17 17
 
18 18
 		// It makes no sense to use this as the link.
19
-		unset( $field_options['show_as_link'] );
19
+		unset($field_options['show_as_link']);
20 20
 
21
-		if( 'edit' === $context ) {
21
+		if ('edit' === $context) {
22 22
 			return $field_options;
23 23
 		}
24 24
 
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
 		 */
28 28
 		$field_options['anchor_text'] = array(
29 29
 			'type' => 'text',
30
-			'label' => __( 'Link Text:', 'gravityview' ),
31
-			'desc' => __( 'Define custom link text. Leave blank to display the URL', 'gravityview' ),
30
+			'label' => __('Link Text:', 'gravityview'),
31
+			'desc' => __('Define custom link text. Leave blank to display the URL', 'gravityview'),
32 32
 			'value' => '',
33 33
 			'merge_tags' => 'force',
34 34
 		);
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
 		$field_options['truncatelink'] = array(
37 37
 			'type' => 'checkbox',
38 38
 			'value' => true,
39
-			'label' => __( 'Shorten Link Display', 'gravityview' ),
40
-			'tooltip' => __( 'Only show the domain for a URL instead of the whole link.', 'gravityview' ),
41
-			'desc' => __( 'Don’t show the full URL, only show the domain.', 'gravityview' )
39
+			'label' => __('Shorten Link Display', 'gravityview'),
40
+			'tooltip' => __('Only show the domain for a URL instead of the whole link.', 'gravityview'),
41
+			'desc' => __('Don’t show the full URL, only show the domain.', 'gravityview')
42 42
 		);
43 43
 
44 44
 		$field_options['open_same_window'] = array(
45 45
 			'type' => 'checkbox',
46 46
 			'value' => false,
47
-			'label' => __( 'Open link in the same window?', 'gravityview' ),
47
+			'label' => __('Open link in the same window?', 'gravityview'),
48 48
 		);
49 49
 
50 50
 		return $field_options;
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-post-content.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,21 +7,21 @@
 block discarded – undo
7 7
 
8 8
 	var $name = 'post_content';
9 9
 
10
-	var $search_operators = array( 'is', 'isnot', 'contains', 'starts_with', 'ends_with' );
10
+	var $search_operators = array('is', 'isnot', 'contains', 'starts_with', 'ends_with');
11 11
 
12 12
 	var $_gf_field_class_name = 'GF_Field_Post_Content';
13 13
 
14 14
 	var $group = 'post';
15 15
 
16
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
16
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
17 17
 
18
-		unset( $field_options['show_as_link'] );
18
+		unset($field_options['show_as_link']);
19 19
 
20
-		if( 'edit' === $context ) {
20
+		if ('edit' === $context) {
21 21
 			return $field_options;
22 22
 		}
23 23
 
24
-		$this->add_field_support('dynamic_data', $field_options );
24
+		$this->add_field_support('dynamic_data', $field_options);
25 25
 
26 26
 		return $field_options;
27 27
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-number.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,24 +9,24 @@
 block discarded – undo
9 9
 
10 10
 	var $name = 'number';
11 11
 
12
-	var $search_operators = array( 'is', 'isnot', 'greater_than', 'less_than' );
12
+	var $search_operators = array('is', 'isnot', 'greater_than', 'less_than');
13 13
 
14 14
 	var $_gf_field_class_name = 'GF_Field_Number';
15 15
 
16 16
 	var $group = 'standard';
17 17
 
18
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
18
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
19 19
 
20 20
 		$field_options['number_format'] = array(
21 21
 			'type' => 'checkbox',
22
-			'label' => __( 'Format number?', 'gravityview' ),
22
+			'label' => __('Format number?', 'gravityview'),
23 23
 			'desc' => __('Display numbers with thousands separators.', 'gravityview'),
24 24
 			'value' => false,
25 25
 		);
26 26
 
27 27
 		$field_options['decimals'] = array(
28 28
 			'type' => 'number',
29
-			'label' => __( 'Decimals', 'gravityview' ),
29
+			'label' => __('Decimals', 'gravityview'),
30 30
 			'desc' => __('Precision of the number of decimal places. Leave blank to use existing precision.', 'gravityview'),
31 31
 			'value' => '',
32 32
 			'merge_tags' => false,
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-multiselect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 	var $name = 'checkbox';
6 6
 
7
-	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains');
7
+	var $search_operators = array('is', 'in', 'not in', 'isnot', 'contains');
8 8
 
9 9
 	var $_gf_field_class_name = 'GF_Field_Checkbox';
10 10
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-post-tags.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@
 block discarded – undo
7 7
 
8 8
 	var $name = 'post_tags';
9 9
 
10
-	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains');
10
+	var $search_operators = array('is', 'in', 'not in', 'isnot', 'contains');
11 11
 
12 12
 	var $_gf_field_class_name = 'GF_Field_Post_Tags';
13 13
 
14 14
 	var $group = 'post';
15 15
 
16
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
16
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
17 17
 
18
-		if( 'edit' === $context ) {
18
+		if ('edit' === $context) {
19 19
 			return $field_options;
20 20
 		}
21 21
 
22
-		$this->add_field_support('dynamic_data', $field_options );
23
-		$this->add_field_support('link_to_term', $field_options );
22
+		$this->add_field_support('dynamic_data', $field_options);
23
+		$this->add_field_support('link_to_term', $field_options);
24 24
 
25 25
 		return $field_options;
26 26
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-custom.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 	var $name = 'custom';
10 10
 
11
-	var $contexts = array( 'single', 'multiple', 'edit' );
11
+	var $contexts = array('single', 'multiple', 'edit');
12 12
 
13 13
 	/**
14 14
 	 * @var bool
@@ -25,23 +25,23 @@  discard block
 block discarded – undo
25 25
 	var $group = 'gravityview';
26 26
 
27 27
 	public function __construct() {
28
-		$this->label = esc_attr__( 'Custom Content', 'gravityview' );
28
+		$this->label = esc_attr__('Custom Content', 'gravityview');
29 29
 		parent::__construct();
30 30
 	}
31 31
 
32
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
32
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
33 33
 
34
-		unset ( $field_options['search_filter'], $field_options['show_as_link'] );
34
+		unset ($field_options['search_filter'], $field_options['show_as_link']);
35 35
 
36
-		if( 'edit' === $context ) {
36
+		if ('edit' === $context) {
37 37
 			return $field_options;
38 38
 		}
39 39
 
40 40
 		$new_fields = array(
41 41
 			'content' => array(
42 42
 				'type' => 'textarea',
43
-				'label' => __( 'Custom Content', 'gravityview' ),
44
-				'desc' => sprintf( __( 'Enter text or HTML. Also supports shortcodes. You can show or hide data using the %s shortcode (%slearn more%s).', 'gravityview' ), '<code>[gvlogic]</code>', '<a href="http://docs.gravityview.co/article/252-gvlogic-shortcode">', '</a>' ),
43
+				'label' => __('Custom Content', 'gravityview'),
44
+				'desc' => sprintf(__('Enter text or HTML. Also supports shortcodes. You can show or hide data using the %s shortcode (%slearn more%s).', 'gravityview'), '<code>[gvlogic]</code>', '<a href="http://docs.gravityview.co/article/252-gvlogic-shortcode">', '</a>'),
45 45
 				'value' => '',
46 46
 				'class'	=> 'code',
47 47
 				'merge_tags' => 'force',
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 			),
50 50
 			'wpautop' => array(
51 51
 				'type' => 'checkbox',
52
-				'label' => __( 'Automatically add paragraphs to content', 'gravityview' ),
53
-				'tooltip' => __( 'Wrap each block of text in an HTML paragraph tag (recommended for text).', 'gravityview' ),
52
+				'label' => __('Automatically add paragraphs to content', 'gravityview'),
53
+				'tooltip' => __('Wrap each block of text in an HTML paragraph tag (recommended for text).', 'gravityview'),
54 54
 				'value' => '',
55 55
 			),
56 56
 		);
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-other-entries.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 
12 12
 	var $is_searchable = false;
13 13
 
14
-	var $contexts = array( 'multiple', 'single' );
14
+	var $contexts = array('multiple', 'single');
15 15
 
16 16
 	var $group = 'gravityview';
17 17
 
18 18
 	public function __construct() {
19
-		$this->label = esc_attr__( 'Other Entries', 'gravityview' );
19
+		$this->label = esc_attr__('Other Entries', 'gravityview');
20 20
 		$this->description = __('Display other entries created by the entry creator.', 'gravityview');
21 21
 		parent::__construct();
22 22
 	}
@@ -25,27 +25,27 @@  discard block
 block discarded – undo
25 25
 	 * @inheritDoc
26 26
 	 * @since 1.7.2
27 27
 	 */
28
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
28
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
29 29
 
30
-		if( 'edit' === $context ) {
30
+		if ('edit' === $context) {
31 31
 			return $field_options;
32 32
 		}
33 33
 
34 34
 		// No "Link to single entry"; all the items will be links to entries!
35
-		unset( $field_options['show_as_link'] );
35
+		unset($field_options['show_as_link']);
36 36
 
37 37
 		$new_options = array();
38 38
 
39 39
 		$new_options['link_format'] = array(
40 40
 			'type'  => 'text',
41
-			'label' => __( 'Entry link text (required)', 'gravityview' ),
41
+			'label' => __('Entry link text (required)', 'gravityview'),
42 42
 			'value' => __('Entry #{entry_id}', 'gravityview'),
43 43
 			'merge_tags' => 'force',
44 44
 		);
45 45
 
46 46
 		$new_options['after_link'] = array(
47 47
 			'type'  => 'textarea',
48
-			'label' => __( 'Text or HTML to display after the link (optional)', 'gravityview' ),
48
+			'label' => __('Text or HTML to display after the link (optional)', 'gravityview'),
49 49
 			'desc'  => __('This content will be displayed below each entry link.', 'gravityview'),
50 50
 			'value' => '',
51 51
 			'merge_tags' => 'force',
@@ -54,24 +54,24 @@  discard block
 block discarded – undo
54 54
 
55 55
 		$new_options['page_size'] = array(
56 56
 			'type'  => 'number',
57
-			'label' => __( 'Entries to Display', 'gravityview' ),
58
-			'desc'  => __( 'What is the maximum number of entries that should be shown?', 'gravityview' ),
57
+			'label' => __('Entries to Display', 'gravityview'),
58
+			'desc'  => __('What is the maximum number of entries that should be shown?', 'gravityview'),
59 59
 			'value' => '10',
60 60
 			'merge_tags' => false,
61 61
 		);
62 62
 
63 63
 		$new_options['no_entries_hide'] = array(
64 64
 			'type'  => 'checkbox',
65
-			'label' => __( 'Hide if no entries', 'gravityview' ),
66
-			'desc'  => __( 'Don\'t display this field if the entry creator has no other entries', 'gravityview' ),
65
+			'label' => __('Hide if no entries', 'gravityview'),
66
+			'desc'  => __('Don\'t display this field if the entry creator has no other entries', 'gravityview'),
67 67
 			'value' => false,
68 68
 		);
69 69
 
70 70
 		$new_options['no_entries_text'] = array(
71 71
 			'type'  => 'text',
72
-			'label' => __( 'No Entries Text', 'gravityview' ),
73
-			'desc'  => __( 'The text that is shown if the entry creator has no other entries (and "Hide if no entries" is disabled).', 'gravityview' ),
74
-			'value' => __( 'This user has no other entries.', 'gravityview' ),
72
+			'label' => __('No Entries Text', 'gravityview'),
73
+			'desc'  => __('The text that is shown if the entry creator has no other entries (and "Hide if no entries" is disabled).', 'gravityview'),
74
+			'value' => __('This user has no other entries.', 'gravityview'),
75 75
 		);
76 76
 
77 77
 		return $new_options + $field_options;
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-html.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 
8 8
 	var $name = 'html';
9 9
 
10
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
10
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
11 11
 
12
-		unset ( $field_options['search_filter'], $field_options['show_as_link'] );
12
+		unset ($field_options['search_filter'], $field_options['show_as_link']);
13 13
 
14 14
 		return $field_options;
15 15
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-radio.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 	var $name = 'checkbox';
6 6
 
7
-	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains');
7
+	var $search_operators = array('is', 'in', 'not in', 'isnot', 'contains');
8 8
 
9 9
 	var $_gf_field_class_name = 'GF_Field_Checkbox';
10 10
 
Please login to merge, or discard this patch.