Completed
Push — master ( 21157a...9cf7be )
by Zack
84:58 queued 65:12
created
includes/fields/class-gravityview-field-date-created.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 
33 33
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
34 34
 
35
-		if( 'edit' === $context ) {
35
+		if ( 'edit' === $context ) {
36 36
 			return $field_options;
37 37
 		}
38 38
 
39
-		$this->add_field_support('date_display', $field_options );
39
+		$this->add_field_support( 'date_display', $field_options );
40 40
 
41 41
 		return $field_options;
42 42
 	}
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
 	public function get_content( $output = '', $entry = array(), $field_settings = array(), $field = array() ) {
59 59
 
60 60
 		/** Overridden by a template. */
61
-		if( ! empty( $field['field_path'] ) ) { return $output; }
61
+		if ( ! empty( $field[ 'field_path' ] ) ) { return $output; }
62 62
 
63
-		return GVCommon::format_date( $field['value'], 'format='.rgar( $field_settings, 'date_display' ) );
63
+		return GVCommon::format_date( $field[ 'value' ], 'format=' . rgar( $field_settings, 'date_display' ) );
64 64
 	}
65 65
 
66 66
 	/**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 *
79 79
 	 * @return string Original text if {date_created} isn't found. Otherwise, replaced text.
80 80
 	 */
81
-	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false  ) {
81
+	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) {
82 82
 
83 83
 		$return = $text;
84 84
 
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
 
88 88
 		foreach ( $matches as $match ) {
89 89
 
90
-			$full_tag          = $match[0];
91
-			$property          = $match[1];
90
+			$full_tag          = $match[ 0 ];
91
+			$property          = $match[ 1 ];
92 92
 
93 93
 			$formatted_date = GravityView_Merge_Tags::format_date( $date_created, $property );
94 94
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-payment-amount.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	public function get_content( $output = '', $entry = array(), $field_settings = array(), $field = array() ) {
49 49
 
50 50
 		/** Overridden by a template. */
51
-		if( ! empty( $field['field_path'] ) ) { return $output; }
51
+		if ( ! empty( $field[ 'field_path' ] ) ) { return $output; }
52 52
 
53 53
 		$amount = rgar( $entry, 'payment_amount' );
54 54
 		$return = GFCommon::to_money( $amount, rgar( $entry, 'currency' ) );
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
 	 *
70 70
 	 * @return string Original text if {date_created} isn't found. Otherwise, replaced text.
71 71
 	 */
72
-	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false  ) {
72
+	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) {
73 73
 
74 74
 		$return = $text;
75 75
 
76 76
 		foreach ( $matches as $match ) {
77 77
 
78
-			$full_tag = $match[0];
79
-			$modifier = isset( $match[1] ) ? $match[1] : false;
78
+			$full_tag = $match[ 0 ];
79
+			$modifier = isset( $match[ 1 ] ) ? $match[ 1 ] : false;
80 80
 
81 81
 			$amount = rgar( $entry, 'payment_amount' );
82 82
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-other-entries.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 	public function __construct() {
25 25
 		$this->label = esc_html__( 'Other Entries', 'gravityview' );
26
-		$this->description = esc_html__('Display other entries created by the entry creator.', 'gravityview');
26
+		$this->description = esc_html__( 'Display other entries created by the entry creator.', 'gravityview' );
27 27
 		parent::__construct();
28 28
 	}
29 29
 
@@ -33,32 +33,32 @@  discard block
 block discarded – undo
33 33
 	 */
34 34
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
35 35
 
36
-		if( 'edit' === $context ) {
36
+		if ( 'edit' === $context ) {
37 37
 			return $field_options;
38 38
 		}
39 39
 
40 40
 		// No "Link to single entry"; all the items will be links to entries!
41
-		unset( $field_options['show_as_link'] );
41
+		unset( $field_options[ 'show_as_link' ] );
42 42
 
43 43
 		$new_options = array();
44 44
 
45
-		$new_options['link_format'] = array(
45
+		$new_options[ 'link_format' ] = array(
46 46
 			'type'  => 'text',
47 47
 			'label' => __( 'Entry link text (required)', 'gravityview' ),
48
-			'value' => __('Entry #{entry_id}', 'gravityview'),
48
+			'value' => __( 'Entry #{entry_id}', 'gravityview' ),
49 49
 			'merge_tags' => 'force',
50 50
 		);
51 51
 
52
-		$new_options['after_link'] = array(
52
+		$new_options[ 'after_link' ] = array(
53 53
 			'type'  => 'textarea',
54 54
 			'label' => __( 'Text or HTML to display after the link (optional)', 'gravityview' ),
55
-			'desc'  => __('This content will be displayed below each entry link.', 'gravityview'),
55
+			'desc'  => __( 'This content will be displayed below each entry link.', 'gravityview' ),
56 56
 			'value' => '',
57 57
 			'merge_tags' => 'force',
58 58
 			'class' => 'widefat code',
59 59
 		);
60 60
 
61
-		$new_options['page_size'] = array(
61
+		$new_options[ 'page_size' ] = array(
62 62
 			'type'  => 'number',
63 63
 			'label' => __( 'Entries to Display', 'gravityview' ),
64 64
 			'desc'  => __( 'What is the maximum number of entries that should be shown?', 'gravityview' ),
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
 			'merge_tags' => false,
67 67
 		);
68 68
 
69
-		$new_options['no_entries_hide'] = array(
69
+		$new_options[ 'no_entries_hide' ] = array(
70 70
 			'type'  => 'checkbox',
71 71
 			'label' => __( 'Hide if no entries', 'gravityview' ),
72 72
 			'desc'  => __( 'Don\'t display this field if the entry creator has no other entries', 'gravityview' ),
73 73
 			'value' => false,
74 74
 		);
75 75
 
76
-		$new_options['no_entries_text'] = array(
76
+		$new_options[ 'no_entries_text' ] = array(
77 77
 			'type'  => 'text',
78 78
 			'label' => __( 'No Entries Text', 'gravityview' ),
79 79
 			'desc'  => __( 'The text that is shown if the entry creator has no other entries (and "Hide if no entries" is disabled).', 'gravityview' ),
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-source-url.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,24 +24,24 @@
 block discarded – undo
24 24
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
25 25
 
26 26
 		// Don't link to entry; doesn't make sense.
27
-		unset( $field_options['show_as_link'] );
27
+		unset( $field_options[ 'show_as_link' ] );
28 28
 
29
-		if( 'edit' === $context ) {
29
+		if ( 'edit' === $context ) {
30 30
 			return $field_options;
31 31
 		}
32 32
 
33 33
 		$add_options = array();
34
-		$add_options['link_to_source'] = array(
34
+		$add_options[ 'link_to_source' ] = array(
35 35
 			'type' => 'checkbox',
36 36
 			'label' => __( 'Link to URL:', 'gravityview' ),
37
-			'desc' => __('Display as a link to the Source URL', 'gravityview'),
37
+			'desc' => __( 'Display as a link to the Source URL', 'gravityview' ),
38 38
 			'value' => false,
39 39
 			'merge_tags' => false,
40 40
 		);
41
-		$add_options['source_link_text'] = array(
41
+		$add_options[ 'source_link_text' ] = array(
42 42
 			'type' => 'text',
43 43
 			'label' => __( 'Link Text:', 'gravityview' ),
44
-			'desc' => __('Customize the link text. If empty, the link text will be the the URL.', 'gravityview'),
44
+			'desc' => __( 'Customize the link text. If empty, the link text will be the the URL.', 'gravityview' ),
45 45
 			'value' => NULL,
46 46
 			'merge_tags' => true,
47 47
 		);
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-email.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
26 26
 	function field_options( $field_options, $template_id = '', $field_id = '', $context = '', $input_type = '' ) {
27 27
 
28 28
 		// It makes no sense to use this as the link.
29
-		unset( $field_options['show_as_link'] );
29
+		unset( $field_options[ 'show_as_link' ] );
30 30
 
31
-		if( 'edit' === $context ) {
31
+		if ( 'edit' === $context ) {
32 32
 			return $field_options;
33 33
 		}
34 34
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-post-content.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@
 block discarded – undo
22 22
 
23 23
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
24 24
 
25
-		unset( $field_options['show_as_link'] );
25
+		unset( $field_options[ 'show_as_link' ] );
26 26
 
27
-		if( 'edit' === $context ) {
27
+		if ( 'edit' === $context ) {
28 28
 			return $field_options;
29 29
 		}
30 30
 
31
-		$this->add_field_support('dynamic_data', $field_options );
31
+		$this->add_field_support( 'dynamic_data', $field_options );
32 32
 
33 33
 		return $field_options;
34 34
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-entry-link.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,25 +30,25 @@
 block discarded – undo
30 30
 
31 31
 	public function __construct() {
32 32
 		$this->label = esc_html__( 'Link to Entry', 'gravityview' );
33
-		$this->description = esc_html__('A dedicated link to the single entry with customizable text.', 'gravityview');
33
+		$this->description = esc_html__( 'A dedicated link to the single entry with customizable text.', 'gravityview' );
34 34
 		parent::__construct();
35 35
 	}
36 36
 
37 37
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
38 38
 
39 39
 		// Always a link!
40
-		unset( $field_options['show_as_link'], $field_options['search_filter'] );
40
+		unset( $field_options[ 'show_as_link' ], $field_options[ 'search_filter' ] );
41 41
 
42
-		if( 'edit' === $context ) {
42
+		if ( 'edit' === $context ) {
43 43
 			return $field_options;
44 44
 		}
45 45
 
46 46
 		$add_options = array();
47
-		$add_options['entry_link_text'] = array(
47
+		$add_options[ 'entry_link_text' ] = array(
48 48
 			'type' => 'text',
49 49
 			'label' => __( 'Link Text:', 'gravityview' ),
50 50
 			'desc' => NULL,
51
-			'value' => __('View Details', 'gravityview'),
51
+			'value' => __( 'View Details', 'gravityview' ),
52 52
 			'merge_tags' => true,
53 53
 		);
54 54
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 		add_filter( 'gravityview/sortable/field_blacklist', array( $this, '_filter_sortable_fields' ), 1 );
112 112
 
113
-		if( $this->_custom_merge_tag ) {
113
+		if ( $this->_custom_merge_tag ) {
114 114
 			add_filter( 'gform_custom_merge_tags', array( $this, '_filter_gform_custom_merge_tags' ), 10, 4 );
115 115
 			add_filter( 'gform_replace_merge_tags', array( $this, '_filter_gform_replace_merge_tags' ), 10, 7 );
116 116
 		}
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 *
133 133
 	 * @return string Original text if {_custom_merge_tag} isn't found. Otherwise, replaced text.
134 134
 	 */
135
-	public function _filter_gform_replace_merge_tags( $text, $form = array(), $entry = array(), $url_encode = false, $esc_html = false  ) {
135
+	public function _filter_gform_replace_merge_tags( $text, $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) {
136 136
 
137 137
 		/**
138 138
 		 * This prevents the gform_replace_merge_tags filter from being called twice, as defined in:
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 		 * @see GFCommon::replace_variables_prepopulate()
141 141
 		 * @todo Remove eventually: Gravity Forms fixed this issue in 1.9.14
142 142
 		 */
143
-		if( false === $form ) {
143
+		if ( false === $form ) {
144 144
 			return $text;
145 145
 		}
146 146
 
@@ -173,19 +173,19 @@  discard block
 block discarded – undo
173 173
 	 */
174 174
 	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) {
175 175
 
176
-		foreach( $matches as $match ) {
176
+		foreach ( $matches as $match ) {
177 177
 
178
-			$full_tag = $match[0];
178
+			$full_tag = $match[ 0 ];
179 179
 
180 180
 			// Strip the Merge Tags
181
-			$tag = str_replace( array( '{', '}'), '', $full_tag );
181
+			$tag = str_replace( array( '{', '}' ), '', $full_tag );
182 182
 
183 183
 			// Replace the value from the entry, if exists
184
-			if( isset( $entry[ $tag ] ) ) {
184
+			if ( isset( $entry[ $tag ] ) ) {
185 185
 
186 186
 				$value = $entry[ $tag ];
187 187
 
188
-				if( is_callable( array( $this, 'get_content') ) ) {
188
+				if ( is_callable( array( $this, 'get_content' ) ) ) {
189 189
 					$value = $this->get_content( $value );
190 190
 				}
191 191
 
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
 	 */
259 259
 	public function _filter_sortable_fields( $not_sortable ) {
260 260
 
261
-		if( ! $this->is_sortable ) {
262
-			$not_sortable[] = $this->name;
261
+		if ( ! $this->is_sortable ) {
262
+			$not_sortable[ ] = $this->name;
263 263
 		}
264 264
 
265 265
 		return $not_sortable;
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 			'date_display' => array(
289 289
 				'type' => 'text',
290 290
 				'label' => __( 'Override Date Format', 'gravityview' ),
291
-				'desc' => sprintf( __( 'Define how the date is displayed (using %sthe PHP date format%s)', 'gravityview'), '<a href="https://codex.wordpress.org/Formatting_Date_and_Time">', '</a>' ),
291
+				'desc' => sprintf( __( 'Define how the date is displayed (using %sthe PHP date format%s)', 'gravityview' ), '<a href="https://codex.wordpress.org/Formatting_Date_and_Time">', '</a>' ),
292 292
 				/**
293 293
 				 * @filter `gravityview_date_format` Override the date format with a [PHP date format](https://codex.wordpress.org/Formatting_Date_and_Time)
294 294
 				 * @param[in,out] null|string $date_format Date Format (default: null)
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
 		$options = $this->field_support_options();
315 315
 
316
-		if( isset( $options[ $key ] ) ) {
316
+		if ( isset( $options[ $key ] ) ) {
317 317
 			$field_options[ $key ] = $options[ $key ];
318 318
 		}
319 319
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-post-category.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 	var $name = 'post_category';
11 11
 
12
-	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains');
12
+	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains' );
13 13
 
14 14
 	var $_gf_field_class_name = 'GF_Field_Post_Category';
15 15
 
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
 
23 23
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
24 24
 
25
-		if( 'edit' === $context ) {
25
+		if ( 'edit' === $context ) {
26 26
 			return $field_options;
27 27
 		}
28 28
 
29
-		$this->add_field_support('dynamic_data', $field_options );
30
-		$this->add_field_support('link_to_term', $field_options );
29
+		$this->add_field_support( 'dynamic_data', $field_options );
30
+		$this->add_field_support( 'link_to_term', $field_options );
31 31
 
32 32
 		return $field_options;
33 33
 	}
Please login to merge, or discard this patch.