Completed
Push — develop ( e2ac27...b5f4d0 )
by Zack
04:24
created
includes/fields/class-gravityview-field-textarea.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
 
8 8
 	var $name = 'textarea';
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_Textarea';
13 13
 
14 14
 	var $group = 'standard';
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
 
@@ -23,16 +23,16 @@  discard block
 block discarded – undo
23 23
 			'type' => 'number',
24 24
 			'merge_tags' => false,
25 25
 			'value' => null,
26
-			'label' => __( 'Maximum words shown', 'gravityview' ),
27
-			'tooltip' => __( 'Enter the number of words to be shown. If specified it truncates the text. Leave it blank if you want to show the full text.', 'gravityview' ),
26
+			'label' => __('Maximum words shown', 'gravityview'),
27
+			'tooltip' => __('Enter the number of words to be shown. If specified it truncates the text. Leave it blank if you want to show the full text.', 'gravityview'),
28 28
 		);
29 29
 
30 30
         $field_options['make_clickable'] = array(
31 31
             'type' => 'checkbox',
32 32
             'merge_tags' => false,
33 33
             'value' => 0,
34
-            'label' => __( 'Convert text URLs to HTML links', 'gravityview' ),
35
-            'tooltip' => __( 'Converts URI, www, FTP, and email addresses in HTML links', 'gravityview' ),
34
+            'label' => __('Convert text URLs to HTML links', 'gravityview'),
35
+            'tooltip' => __('Converts URI, www, FTP, and email addresses in HTML links', 'gravityview'),
36 36
         );
37 37
 
38 38
 		return $field_options;
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-fileupload.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@  discard block
 block discarded – undo
11 11
 
12 12
 	var $name = 'fileupload';
13 13
 
14
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
14
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
15 15
 
16
-		unset( $field_options['search_filter'] );
16
+		unset($field_options['search_filter']);
17 17
 
18
-		if( 'edit' === $context ) {
18
+		if ('edit' === $context) {
19 19
 			return $field_options;
20 20
 		}
21 21
 
22 22
 		$add_options['link_to_file'] = array(
23 23
 			'type' => 'checkbox',
24
-			'label' => __( 'Display as a Link:', 'gravityview' ),
24
+			'label' => __('Display as a Link:', 'gravityview'),
25 25
 			'desc' => __('Display the uploaded files as links, rather than embedded content.', 'gravityview'),
26 26
 			'value' => false,
27 27
 			'merge_tags' => false,
@@ -43,28 +43,28 @@  discard block
 block discarded – undo
43 43
 	 * @param  string $gv_class Field class to add to the output HTML
44 44
 	 * @return array           Array of file output, with `file_path` and `html` keys (see comments above)
45 45
 	 */
46
-	static function get_files_array( $value, $gv_class ) {
46
+	static function get_files_array($value, $gv_class) {
47 47
 
48 48
 		$gravityview_view = GravityView_View::getInstance();
49 49
 
50
-		extract( $gravityview_view->getCurrentField() );
50
+		extract($gravityview_view->getCurrentField());
51 51
 
52 52
 		$output_arr = array();
53 53
 
54 54
 		// Get an array of file paths for the field.
55
-		$file_paths = rgar( $field , 'multipleFiles' ) ? json_decode( $value ) : array( $value );
55
+		$file_paths = rgar($field, 'multipleFiles') ? json_decode($value) : array($value);
56 56
 
57 57
 		// Process each file path
58
-		foreach( $file_paths as $file_path ) {
58
+		foreach ($file_paths as $file_path) {
59 59
 
60 60
 			// If the site is HTTPS, use HTTPS
61
-			if(function_exists('set_url_scheme')) { $file_path = set_url_scheme($file_path); }
61
+			if (function_exists('set_url_scheme')) { $file_path = set_url_scheme($file_path); }
62 62
 
63 63
 			// This is from Gravity Forms's code
64 64
 			$file_path = esc_attr(str_replace(" ", "%20", $file_path));
65 65
 
66 66
 			// If the field is set to link to the single entry, link to it.
67
-			$link = !empty( $field_settings['show_as_link'] ) ? GravityView_API::entry_link( $entry, $field ) : $file_path;
67
+			$link = !empty($field_settings['show_as_link']) ? GravityView_API::entry_link($entry, $field) : $file_path;
68 68
 
69 69
 			// Get file path information
70 70
 			$file_path_info = pathinfo($file_path);
@@ -86,20 +86,20 @@  discard block
 block discarded – undo
86 86
 			$content = $image->html();
87 87
 
88 88
 			// The new default content is the image, if it exists. If not, use the file name as the content.
89
-			$content = !empty( $content ) ? $content : $file_path_info['basename'];
89
+			$content = !empty($content) ? $content : $file_path_info['basename'];
90 90
 
91 91
 			// If pathinfo() gave us the extension of the file, run the switch statement using that.
92
-			$extension = empty( $file_path_info['extension'] ) ? NULL : strtolower( $file_path_info['extension'] );
92
+			$extension = empty($file_path_info['extension']) ? NULL : strtolower($file_path_info['extension']);
93 93
 
94 94
 
95
-			switch( true ) {
95
+			switch (true) {
96 96
 
97 97
 				// Audio file
98
-				case in_array( $extension, wp_get_audio_extensions() ):
98
+				case in_array($extension, wp_get_audio_extensions()):
99 99
 
100 100
 					$disable_lightbox = true;
101 101
 
102
-					if( shortcode_exists( 'audio' ) ) {
102
+					if (shortcode_exists('audio')) {
103 103
 
104 104
 						$disable_wrapped_link = true;
105 105
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 						 * @since  1.2
109 109
 						 * @param array $audio_settings Array with `src` and `class` keys
110 110
 						 */
111
-						$audio_settings = apply_filters( 'gravityview_audio_settings', array(
111
+						$audio_settings = apply_filters('gravityview_audio_settings', array(
112 112
 							'src' => $file_path,
113 113
 							'class' => 'wp-audio-shortcode gv-audio gv-field-id-'.$field_settings['id']
114 114
 						));
@@ -118,18 +118,18 @@  discard block
 block discarded – undo
118 118
 						 * @see http://codex.wordpress.org/Audio_Shortcode
119 119
 						 * @see https://developer.wordpress.org/reference/functions/wp_audio_shortcode/
120 120
 						 */
121
-						$content = wp_audio_shortcode( $audio_settings );
121
+						$content = wp_audio_shortcode($audio_settings);
122 122
 
123 123
 					}
124 124
 
125 125
 					break;
126 126
 
127 127
 				// Video file
128
-				case in_array( $extension, wp_get_video_extensions() ):
128
+				case in_array($extension, wp_get_video_extensions()):
129 129
 
130 130
 					$disable_lightbox = true;
131 131
 
132
-					if( shortcode_exists( 'video' ) ) {
132
+					if (shortcode_exists('video')) {
133 133
 
134 134
 						$disable_wrapped_link = true;
135 135
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 						 * @since  1.2
139 139
 						 * @param array $video_settings Array with `src` and `class` keys
140 140
 						 */
141
-						$video_settings = apply_filters( 'gravityview_video_settings', array(
141
+						$video_settings = apply_filters('gravityview_video_settings', array(
142 142
 							'src' => $file_path,
143 143
 							'class' => 'wp-video-shortcode gv-video gv-field-id-'.$field_settings['id']
144 144
 						));
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 						 * @see http://codex.wordpress.org/Video_Shortcode
149 149
 						 * @see https://developer.wordpress.org/reference/functions/wp_video_shortcode/
150 150
 						 */
151
-						$content = wp_video_shortcode( $video_settings );
151
+						$content = wp_video_shortcode($video_settings);
152 152
 
153 153
 					}
154 154
 
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
 				case $extension === 'pdf':
159 159
 
160 160
 					// PDF needs to be displayed in an IFRAME
161
-					$link = add_query_arg( array( 'TB_iframe' => 'true' ), $link );
161
+					$link = add_query_arg(array('TB_iframe' => 'true'), $link);
162 162
 
163 163
 					break;
164 164
 
165 165
 				// if not image, do not set the lightbox (@since 1.5.3)
166
-				case !in_array( $extension, array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' ) ):
166
+				case !in_array($extension, array('jpg', 'jpeg', 'jpe', 'gif', 'png')):
167 167
 
168 168
 					$disable_lightbox = true;
169 169
 
@@ -173,10 +173,10 @@  discard block
 block discarded – undo
173 173
 
174 174
 			// If using Link to File, override the content.
175 175
 			// (We do this here so that the $disable_lightbox can be set. Yes, there's a little more processing time, but oh well.)
176
-			if( !empty( $field_settings['link_to_file'] ) ) {
176
+			if (!empty($field_settings['link_to_file'])) {
177 177
 
178 178
 				// Force the content to be the file name
179
-				$content =  $file_path_info["basename"];
179
+				$content = $file_path_info["basename"];
180 180
 
181 181
 				// Restore the wrapped link
182 182
 				$disable_wrapped_link = false;
@@ -184,14 +184,14 @@  discard block
 block discarded – undo
184 184
 			}
185 185
 
186 186
 			// Whether to use lightbox or not
187
-			if( $disable_lightbox || empty( $gravityview_view->atts['lightbox'] ) || !empty( $field_settings['show_as_link'] ) ) {
187
+			if ($disable_lightbox || empty($gravityview_view->atts['lightbox']) || !empty($field_settings['show_as_link'])) {
188 188
 
189
-				$link_atts = empty( $field_settings['show_as_link'] ) ? array( 'target' => '_blank' ) : array();
189
+				$link_atts = empty($field_settings['show_as_link']) ? array('target' => '_blank') : array();
190 190
 
191 191
 			} else {
192 192
 
193 193
 				$link_atts = array(
194
-					'rel' => sprintf( "%s-%s", $gv_class, $entry['id'] ),
194
+					'rel' => sprintf("%s-%s", $gv_class, $entry['id']),
195 195
 					'target' => '_blank',
196 196
 					'class' => 'thickbox',
197 197
 				);
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 			 * @param array|string $link_atts Array or attributes string
204 204
 			 * @param array $field Current GravityView field array
205 205
 			 */
206
-			$link_atts = apply_filters( 'gravityview/fields/fileupload/link_atts', $link_atts, $gravityview_view->getCurrentField() );
206
+			$link_atts = apply_filters('gravityview/fields/fileupload/link_atts', $link_atts, $gravityview_view->getCurrentField());
207 207
 
208 208
 			/**
209 209
 			 * @filter `gravityview/fields/fileupload/disable_link` Filter to alter the default behaviour of wrapping images (or image names) with a link to the content object
@@ -212,10 +212,10 @@  discard block
 block discarded – undo
212 212
 			 * @param array $gravityview_view->field_data
213 213
 			 * @see GravityView_API:field_value() for info about $gravityview_view->field_data
214 214
 			 */
215
-			$disable_wrapped_link = apply_filters( 'gravityview/fields/fileupload/disable_link', $disable_wrapped_link, $gravityview_view->getCurrentField() );
215
+			$disable_wrapped_link = apply_filters('gravityview/fields/fileupload/disable_link', $disable_wrapped_link, $gravityview_view->getCurrentField());
216 216
 
217 217
 			// If the HTML output hasn't been overridden by the switch statement above, use the default format
218
-			if( !empty( $content ) && empty( $disable_wrapped_link ) ) {
218
+			if (!empty($content) && empty($disable_wrapped_link)) {
219 219
 
220 220
 				/**
221 221
 				 * Modify the link text (defaults to the file name)
@@ -225,9 +225,9 @@  discard block
 block discarded – undo
225 225
 				 * @param string $content The existing anchor content. Could be `<img>` tag, audio/video embed or the file name
226 226
 				 * @param array $field GravityView array of the current field being processed
227 227
 				 */
228
-				$content = apply_filters( 'gravityview/fields/fileupload/link_content', $content, $gravityview_view->getCurrentField() );
228
+				$content = apply_filters('gravityview/fields/fileupload/link_content', $content, $gravityview_view->getCurrentField());
229 229
 
230
-                $content = gravityview_get_link( $link, $content, $link_atts );
230
+                $content = gravityview_get_link($link, $content, $link_atts);
231 231
 			}
232 232
 
233 233
 			$output_arr[] = array(
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 		 *  @type string $content The generated output for the file \n
246 246
 		 * @param array $field GravityView array of the current field being processed
247 247
 		 */
248
-		$output_arr = apply_filters( 'gravityview/fields/fileupload/files_array', $output_arr, $gravityview_view->getCurrentField() );
248
+		$output_arr = apply_filters('gravityview/fields/fileupload/files_array', $output_arr, $gravityview_view->getCurrentField());
249 249
 
250 250
 		return $output_arr;
251 251
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-date-created.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
7 7
 
8 8
 	var $name = 'date_created';
9 9
 
10
-	var $search_operators = array( 'less_than', 'greater_than', 'is', 'isnot' );
10
+	var $search_operators = array('less_than', 'greater_than', 'is', 'isnot');
11 11
 
12 12
 	var $group = 'meta';
13 13
 
14 14
 	public function __construct() {
15
-		$this->label = esc_attr__( 'Date Created', 'gravityview' );
15
+		$this->label = esc_attr__('Date Created', 'gravityview');
16 16
 		parent::__construct();
17 17
 	}
18 18
 
19
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
19
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
20 20
 
21
-		if( 'edit' === $context ) {
21
+		if ('edit' === $context) {
22 22
 			return $field_options;
23 23
 		}
24 24
 
25
-		$this->add_field_support('date_display', $field_options );
25
+		$this->add_field_support('date_display', $field_options);
26 26
 
27 27
 		return $field_options;
28 28
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-post-category.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_category';
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_Category';
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-post-image.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@
 block discarded – undo
7 7
 
8 8
 	var $name = 'post_image';
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'] );
12
+		unset ($field_options['search_filter']);
13 13
 
14
-		if( 'edit' === $context ) {
14
+		if ('edit' === $context) {
15 15
 			return $field_options;
16 16
 		}
17 17
 
18
-		$this->add_field_support('link_to_post', $field_options );
18
+		$this->add_field_support('link_to_post', $field_options);
19 19
 
20 20
 		// @since 1.5.4
21
-		$this->add_field_support('dynamic_data', $field_options );
21
+		$this->add_field_support('dynamic_data', $field_options);
22 22
 
23 23
 		return $field_options;
24 24
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @type array
70 70
 	 * @since 1.15.2
71 71
 	 */
72
-	var $contexts = array( 'single', 'multiple', 'edit', 'export' );
72
+	var $contexts = array('single', 'multiple', 'edit', 'export');
73 73
 
74 74
 	/**
75 75
 	 * @internal Not yet implemented
@@ -95,16 +95,16 @@  discard block
 block discarded – undo
95 95
 		/**
96 96
 		 * If this is a Gravity Forms field, use their labels. Spare our translation team!
97 97
 		 */
98
-		if( ! empty( $this->_gf_field_class_name ) && class_exists( $this->_gf_field_class_name ) ) {
98
+		if (!empty($this->_gf_field_class_name) && class_exists($this->_gf_field_class_name)) {
99 99
 			/** @var GF_Field $GF_Field */
100 100
 			$GF_Field = new $this->_gf_field_class_name;
101 101
 			$this->label = $GF_Field->get_form_editor_field_title();
102 102
 		}
103 103
 
104 104
 		// Modify the field options based on the name of the field type
105
-		add_filter( sprintf( 'gravityview_template_%s_options', $this->name ), array( &$this, 'field_options' ), 10, 5 );
105
+		add_filter(sprintf('gravityview_template_%s_options', $this->name), array(&$this, 'field_options'), 10, 5);
106 106
 
107
-		add_filter( 'gravityview/sortable/field_blacklist', array( $this, '_filter_sortable_fields' ), 1 );
107
+		add_filter('gravityview/sortable/field_blacklist', array($this, '_filter_sortable_fields'), 1);
108 108
 	}
109 109
 
110 110
 	/**
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 	 *
118 118
 	 * @return array
119 119
 	 */
120
-	public function _filter_sortable_fields( $not_sortable ) {
120
+	public function _filter_sortable_fields($not_sortable) {
121 121
 
122
-		if( ! $this->is_sortable ) {
122
+		if (!$this->is_sortable) {
123 123
 			$not_sortable[] = $this->name;
124 124
 		}
125 125
 
@@ -130,35 +130,35 @@  discard block
 block discarded – undo
130 130
 		$options = array(
131 131
 			'link_to_post' => array(
132 132
 				'type' => 'checkbox',
133
-				'label' => __( 'Link to the post', 'gravityview' ),
134
-				'desc' => __( 'Link to the post created by the entry.', 'gravityview' ),
133
+				'label' => __('Link to the post', 'gravityview'),
134
+				'desc' => __('Link to the post created by the entry.', 'gravityview'),
135 135
 				'value' => false,
136 136
 			),
137 137
 			'link_to_term' => array(
138 138
 				'type' => 'checkbox',
139
-				'label' => __( 'Link to the category or tag', 'gravityview' ),
140
-				'desc' => __( 'Link to the current category or tag. "Link to single entry" must be unchecked.', 'gravityview' ),
139
+				'label' => __('Link to the category or tag', 'gravityview'),
140
+				'desc' => __('Link to the current category or tag. "Link to single entry" must be unchecked.', 'gravityview'),
141 141
 				'value' => false,
142 142
 			),
143 143
 			'dynamic_data' => array(
144 144
 				'type' => 'checkbox',
145
-				'label' => __( 'Use the live post data', 'gravityview' ),
146
-				'desc' => __( 'Instead of using the entry data, instead use the current post data.', 'gravityview' ),
145
+				'label' => __('Use the live post data', 'gravityview'),
146
+				'desc' => __('Instead of using the entry data, instead use the current post data.', 'gravityview'),
147 147
 				'value' => true,
148 148
 			),
149 149
 			'date_display' => array(
150 150
 				'type' => 'text',
151
-				'label' => __( 'Override Date Format', 'gravityview' ),
152
-				'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>' ),
151
+				'label' => __('Override Date Format', 'gravityview'),
152
+				'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>'),
153 153
 				/**
154 154
 				 * @filter `gravityview_date_format` Override the date format with a [PHP date format](https://codex.wordpress.org/Formatting_Date_and_Time)
155 155
 				 * @param[in,out] null|string $date_format Date Format (default: null)
156 156
 				 */
157
-				'value' => apply_filters( 'gravityview_date_format', null )
157
+				'value' => apply_filters('gravityview_date_format', null)
158 158
 			),
159 159
 			'new_window' => array(
160 160
 				'type' => 'checkbox',
161
-				'label' => __( 'Open link in a new tab or window?', 'gravityview' ),
161
+				'label' => __('Open link in a new tab or window?', 'gravityview'),
162 162
 				'value' => false,
163 163
 			),
164 164
 		);
@@ -167,15 +167,15 @@  discard block
 block discarded – undo
167 167
 		 * @filter `gravityview_field_support_options` Modify the settings that a field supports
168 168
 		 * @param array $options Options multidimensional array with each key being the input name, with each array setting having `type`, `label`, `desc` and `value` (default values) keys
169 169
 		 */
170
-		return apply_filters( 'gravityview_field_support_options', $options );
170
+		return apply_filters('gravityview_field_support_options', $options);
171 171
 	}
172 172
 
173
-	function add_field_support( $key = '', &$field_options ) {
173
+	function add_field_support($key = '', &$field_options) {
174 174
 
175 175
 		$options = $this->field_support_options();
176 176
 
177
-		if( isset( $options[ $key ] ) ) {
178
-			$field_options[ $key ] = $options[ $key ];
177
+		if (isset($options[$key])) {
178
+			$field_options[$key] = $options[$key];
179 179
 		}
180 180
 
181 181
 		return $field_options;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	 * @param  [type]      $input_type    [description]
212 212
 	 * @return [type]                     [description]
213 213
 	 */
214
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
214
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
215 215
 
216 216
 		$this->_field_options = $field_options;
217 217
 		$this->_field_id = $field_id;
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-post-title.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_title';
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_Title';
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('link_to_post', $field_options );
22
+		$this->add_field_support('link_to_post', $field_options);
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-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&rsquo;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&rsquo;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.