Completed
Push — develop ( 40b6cc...bd6ad5 )
by Zack
04:49
created
includes/fields/class-gravityview-field-class-gravityview-fields.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -5,17 +5,17 @@  discard block
 block discarded – undo
5 5
 	/* @var GravityView_Field[] */
6 6
 	private static $_fields = array();
7 7
 
8
-	public static function register( $field ) {
9
-		if ( ! is_subclass_of( $field, 'GravityView_Field' ) ) {
10
-			throw new Exception( 'Must be a subclass of GravityView_Field' );
8
+	public static function register($field) {
9
+		if (!is_subclass_of($field, 'GravityView_Field')) {
10
+			throw new Exception('Must be a subclass of GravityView_Field');
11 11
 		}
12
-		if ( empty( $field->type ) ) {
13
-			throw new Exception( 'The type must be set' );
12
+		if (empty($field->type)) {
13
+			throw new Exception('The type must be set');
14 14
 		}
15
-		if ( isset( self::$_fields[ $field->type ] ) ) {
16
-			throw new Exception( 'Field type already registered: ' . $field->type );
15
+		if (isset(self::$_fields[$field->type])) {
16
+			throw new Exception('Field type already registered: '.$field->type);
17 17
 		}
18
-		self::$_fields[ $field->type ] = $field;
18
+		self::$_fields[$field->type] = $field;
19 19
 	}
20 20
 
21 21
 	/**
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
 	 *
24 24
 	 * @return GravityView_Field | bool
25 25
 	 */
26
-	public static function create( $properties ) {
26
+	public static function create($properties) {
27 27
 		$type = isset($properties['type']) ? $properties['type'] : '';
28
-		$type = empty( $properties['inputType'] ) ? $type : $properties['inputType'];
29
-		if ( empty($type) || ! isset( self::$_fields[ $type ] ) ) {
30
-			return new GravityView_Field( $properties );
28
+		$type = empty($properties['inputType']) ? $type : $properties['inputType'];
29
+		if (empty($type) || !isset(self::$_fields[$type])) {
30
+			return new GravityView_Field($properties);
31 31
 		}
32
-		$class      = self::$_fields[ $type ];
33
-		$class_name = get_class( $class );
34
-		$field      = new $class_name( $properties );
32
+		$class      = self::$_fields[$type];
33
+		$class_name = get_class($class);
34
+		$field      = new $class_name($properties);
35 35
 
36 36
 		return $field;
37 37
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-date.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 
8 8
 	var $name = 'date';
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
-		if( 'edit' === $context ) {
12
+		if ('edit' === $context) {
13 13
 			return $field_options;
14 14
 		}
15 15
 
16
-		$this->add_field_support('date_display', $field_options );
16
+		$this->add_field_support('date_display', $field_options);
17 17
 
18 18
 		return $field_options;
19 19
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-email.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@  discard block
 block discarded – undo
7 7
 
8 8
 	var $name = 'email';
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_Email';
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 16
 		// It makes no sense to use this as the link.
17
-		unset( $field_options['show_as_link'] );
17
+		unset($field_options['show_as_link']);
18 18
 
19
-		if( 'edit' === $context ) {
19
+		if ('edit' === $context) {
20 20
 			return $field_options;
21 21
 		}
22 22
 
@@ -24,29 +24,29 @@  discard block
 block discarded – undo
24 24
 			'emailmailto' => array(
25 25
 				'type' => 'checkbox',
26 26
 				'value' => true,
27
-				'label' => __( 'Link the Email Address', 'gravityview' ),
28
-				'desc' => __( 'Clicking the link will generate a new email.', 'gravityview' ),
27
+				'label' => __('Link the Email Address', 'gravityview'),
28
+				'desc' => __('Clicking the link will generate a new email.', 'gravityview'),
29 29
 			),
30 30
 			'emailsubject' => array(
31 31
 				'type' => 'text',
32
-				'label' => __( 'Email Subject', 'gravityview' ),
32
+				'label' => __('Email Subject', 'gravityview'),
33 33
 				'value' => '',
34
-				'desc' => __( 'Set the default email subject line.', 'gravityview' ),
34
+				'desc' => __('Set the default email subject line.', 'gravityview'),
35 35
 				'merge_tags' => 'force',
36 36
 			),
37 37
 			'emailbody' => array(
38 38
 				'type' => 'textarea',
39
-				'label' => __( 'Email Body', 'gravityview' ),
39
+				'label' => __('Email Body', 'gravityview'),
40 40
 				'value' => '',
41
-				'desc' => __( 'Set the default email content.', 'gravityview' ),
41
+				'desc' => __('Set the default email content.', 'gravityview'),
42 42
 				'merge_tags' => 'force',
43 43
 				'class' => 'widefat',
44 44
 			),
45 45
 			'emailencrypt' => array(
46 46
 				'type' => 'checkbox',
47 47
 				'value' => true,
48
-				'label' => __( 'Encrypt Email Address', 'gravityview' ),
49
-				'desc' => __( 'Make it harder for spammers to get email addresses from your entries. Email addresses will not be visible with Javascript disabled.', 'gravityview' )
48
+				'label' => __('Encrypt Email Address', 'gravityview'),
49
+				'desc' => __('Make it harder for spammers to get email addresses from your entries. Email addresses will not be visible with Javascript disabled.', 'gravityview')
50 50
 			)
51 51
 		);
52 52
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-entry-link.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 	var $name = 'entry_link';
9 9
 
10
-	var $contexts = array( 'multiple' );
10
+	var $contexts = array('multiple');
11 11
 
12 12
 	/**
13 13
 	 * @var bool
@@ -22,24 +22,24 @@  discard block
 block discarded – undo
22 22
 	var $is_searchable = false;
23 23
 
24 24
 	public function __construct() {
25
-		$this->label = esc_attr__( 'Link to Entry', 'gravityview' );
25
+		$this->label = esc_attr__('Link to Entry', 'gravityview');
26 26
 		$this->description = __('A dedicated link to the single entry with customizable text.', 'gravityview');
27 27
 		parent::__construct();
28 28
 	}
29 29
 
30
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
30
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
31 31
 
32 32
 		// Always a link!
33
-		unset( $field_options['show_as_link'], $field_options['search_filter'] );
33
+		unset($field_options['show_as_link'], $field_options['search_filter']);
34 34
 
35
-		if( 'edit' === $context ) {
35
+		if ('edit' === $context) {
36 36
 			return $field_options;
37 37
 		}
38 38
 
39 39
 		$add_options = array();
40 40
 		$add_options['entry_link_text'] = array(
41 41
 			'type' => 'text',
42
-			'label' => __( 'Link Text:', 'gravityview' ),
42
+			'label' => __('Link Text:', 'gravityview'),
43 43
 			'desc' => NULL,
44 44
 			'value' => __('View Details', 'gravityview'),
45 45
 			'merge_tags' => true,
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-fileupload.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@
 block discarded – undo
227 227
 				 */
228 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(
Please login to merge, or discard this 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-gquiz_score.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,20 +10,20 @@
 block discarded – undo
10 10
 	var $label = 'Quiz Score';
11 11
 
12 12
 	public function __construct() {
13
-		$this->label = esc_attr__( 'Quiz Score', 'gravityview' );
13
+		$this->label = esc_attr__('Quiz Score', 'gravityview');
14 14
 		parent::__construct();
15 15
 	}
16 16
 
17
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
17
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
18 18
 
19
-		if( 'edit' === $context ) {
19
+		if ('edit' === $context) {
20 20
 			return $field_options;
21 21
 		}
22 22
 
23 23
 		$new_fields = array(
24 24
 			'quiz_use_max_score' => array(
25 25
 				'type' => 'checkbox',
26
-				'label' => __( 'Show Max Score?', 'gravityview' ),
26
+				'label' => __('Show Max Score?', 'gravityview'),
27 27
 				'desc' => __('Display score as the a fraction: "[score]/[max score]". If unchecked, will display score.', 'gravityview'),
28 28
 				'value' => true,
29 29
 				'merge_tags' => false,
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-post-id.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,19 +11,19 @@
 block discarded – undo
11 11
 
12 12
 	var $label = 'Post ID';
13 13
 
14
-	var $search_operators = array( 'is', 'isnot', 'greater_than', 'less_than' );
14
+	var $search_operators = array('is', 'isnot', 'greater_than', 'less_than');
15 15
 
16 16
 	/**
17 17
 	 * GravityView_Field_Post_ID constructor.
18 18
 	 */
19 19
 	public function __construct() {
20
-		$this->label = __( 'Post ID', 'gravityview' );
20
+		$this->label = __('Post ID', 'gravityview');
21 21
 		parent::__construct();
22 22
 	}
23 23
 
24
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
24
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
25 25
 
26
-		$this->add_field_support('link_to_post', $field_options );
26
+		$this->add_field_support('link_to_post', $field_options);
27 27
 
28 28
 		return $field_options;
29 29
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-source-url.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,35 +7,35 @@
 block discarded – undo
7 7
 
8 8
 	var $name = 'source_url';
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 $label = 'Source URL';
13 13
 
14 14
 	public function __construct() {
15
-		$this->label = esc_attr__( 'Source URL', 'gravityview' );
15
+		$this->label = esc_attr__('Source URL', '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 21
 		// Don't link to entry; doesn't make sense.
22
-		unset( $field_options['show_as_link'] );
22
+		unset($field_options['show_as_link']);
23 23
 
24
-		if( 'edit' === $context ) {
24
+		if ('edit' === $context) {
25 25
 			return $field_options;
26 26
 		}
27 27
 
28 28
 		$add_options = array();
29 29
 		$add_options['link_to_source'] = array(
30 30
 			'type' => 'checkbox',
31
-			'label' => __( 'Link to URL:', 'gravityview' ),
31
+			'label' => __('Link to URL:', 'gravityview'),
32 32
 			'desc' => __('Display as a link to the Source URL', 'gravityview'),
33 33
 			'value' => false,
34 34
 			'merge_tags' => false,
35 35
 		);
36 36
 		$add_options['source_link_text'] = array(
37 37
 			'type' => 'text',
38
-			'label' => __( 'Link Text:', 'gravityview' ),
38
+			'label' => __('Link Text:', 'gravityview'),
39 39
 			'desc' => __('Customize the link text. If empty, the link text will be the the URL.', 'gravityview'),
40 40
 			'value' => NULL,
41 41
 			'merge_tags' => true,
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-textarea.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@
 block discarded – undo
21 21
 			'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' ),
22 22
 		);
23 23
 
24
-        $field_options['make_clickable'] = array(
25
-            'type' => 'checkbox',
26
-            'merge_tags' => false,
27
-            'value' => 0,
28
-            'label' => __( 'Convert text URLs to HTML links', 'gravityview' ),
29
-            'tooltip' => __( 'Converts URI, www, FTP, and email addresses in HTML links', 'gravityview' ),
30
-        );
24
+		$field_options['make_clickable'] = array(
25
+			'type' => 'checkbox',
26
+			'merge_tags' => false,
27
+			'value' => 0,
28
+			'label' => __( 'Convert text URLs to HTML links', 'gravityview' ),
29
+			'tooltip' => __( 'Converts URI, www, FTP, and email addresses in HTML links', 'gravityview' ),
30
+		);
31 31
 
32 32
 		return $field_options;
33 33
 	}
Please login to merge, or discard this 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.