@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | $user_ids = get_users( $args ); |
131 | 131 | |
132 | - return empty( $user_ids ) ? false : (int) $user_ids[0]; |
|
132 | + return empty( $user_ids ) ? false : (int)$user_ids[ 0 ]; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | return false; |
154 | 154 | } |
155 | 155 | |
156 | - if ( time() > (int) $expiration ) { |
|
156 | + if ( time() > (int)$expiration ) { |
|
157 | 157 | return false; |
158 | 158 | } |
159 | 159 | |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | |
380 | 380 | $user = get_users( $args ); |
381 | 381 | |
382 | - return empty( $user ) ? null : $user[0]; |
|
382 | + return empty( $user ) ? null : $user[ 0 ]; |
|
383 | 383 | } |
384 | 384 | |
385 | 385 | /** |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | $support_users = $this->get_all(); |
438 | 438 | |
439 | 439 | if ( $support_users ) { |
440 | - return $support_users[0]; |
|
440 | + return $support_users[ 0 ]; |
|
441 | 441 | } |
442 | 442 | |
443 | 443 | return null; |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | 'number' => 1, |
525 | 525 | ) ); |
526 | 526 | |
527 | - $reassign_id = empty( $admins ) ? null : $admins[0]->ID; |
|
527 | + $reassign_id = empty( $admins ) ? null : $admins[ 0 ]->ID; |
|
528 | 528 | |
529 | 529 | $this->logging->log( 'Reassign user ID: ' . var_export( $reassign_id, true ), __METHOD__, 'info' ); |
530 | 530 |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | // autoload_classmap.php @generated by Composer |
4 | 4 | |
5 | -$vendorDir = dirname(dirname(__FILE__)); |
|
6 | -$baseDir = dirname($vendorDir); |
|
5 | +$vendorDir = dirname( dirname( __FILE__ ) ); |
|
6 | +$baseDir = dirname( $vendorDir ); |
|
7 | 7 | |
8 | 8 | return array( |
9 | 9 | 'ComposerAutoloaderInitb5638313a52df4893eb45c04efdaa356' => $vendorDir . '/trustedlogin/client/vendor/composer/autoload_real.php', |
@@ -2,12 +2,12 @@ |
||
2 | 2 | |
3 | 3 | // autoload_psr4.php @generated by Composer |
4 | 4 | |
5 | -$vendorDir = dirname(dirname(__FILE__)); |
|
6 | -$baseDir = dirname($vendorDir); |
|
5 | +$vendorDir = dirname( dirname( __FILE__ ) ); |
|
6 | +$baseDir = dirname( $vendorDir ); |
|
7 | 7 | |
8 | 8 | return array( |
9 | - 'TrustedLogin\\' => array($baseDir . '/src', $vendorDir . '/trustedlogin/client/src'), |
|
10 | - 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), |
|
11 | - 'Katzgrau\\KLogger\\' => array($vendorDir . '/katzgrau/klogger/src'), |
|
12 | - 'KatzGrau\\KLogger\\' => array($baseDir . '/src'), |
|
9 | + 'TrustedLogin\\' => array( $baseDir . '/src', $vendorDir . '/trustedlogin/client/src' ), |
|
10 | + 'Psr\\Log\\' => array( $vendorDir . '/psr/log/Psr/Log' ), |
|
11 | + 'Katzgrau\\KLogger\\' => array( $vendorDir . '/katzgrau/klogger/src' ), |
|
12 | + 'KatzGrau\\KLogger\\' => array( $baseDir . '/src' ), |
|
13 | 13 | ); |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | // autoload_files.php @generated by Composer |
4 | 4 | |
5 | -$vendorDir = dirname(dirname(__FILE__)); |
|
6 | -$baseDir = dirname($vendorDir); |
|
5 | +$vendorDir = dirname( dirname( __FILE__ ) ); |
|
6 | +$baseDir = dirname( $vendorDir ); |
|
7 | 7 | |
8 | 8 | return array( |
9 | 9 | '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', |
@@ -6,48 +6,48 @@ discard block |
||
6 | 6 | |
7 | 7 | class ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d |
8 | 8 | { |
9 | - public static $files = array ( |
|
9 | + public static $files = array( |
|
10 | 10 | '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', |
11 | 11 | '3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php', |
12 | 12 | ); |
13 | 13 | |
14 | - public static $prefixLengthsPsr4 = array ( |
|
14 | + public static $prefixLengthsPsr4 = array( |
|
15 | 15 | 'T' => |
16 | - array ( |
|
16 | + array( |
|
17 | 17 | 'TrustedLogin\\' => 13, |
18 | 18 | ), |
19 | 19 | 'P' => |
20 | - array ( |
|
20 | + array( |
|
21 | 21 | 'Psr\\Log\\' => 8, |
22 | 22 | ), |
23 | 23 | 'K' => |
24 | - array ( |
|
24 | + array( |
|
25 | 25 | 'Katzgrau\\KLogger\\' => 17, |
26 | 26 | 'KatzGrau\\KLogger\\' => 17, |
27 | 27 | ), |
28 | 28 | ); |
29 | 29 | |
30 | - public static $prefixDirsPsr4 = array ( |
|
30 | + public static $prefixDirsPsr4 = array( |
|
31 | 31 | 'TrustedLogin\\' => |
32 | - array ( |
|
32 | + array( |
|
33 | 33 | 0 => __DIR__ . '/../..' . '/src', |
34 | 34 | 1 => __DIR__ . '/..' . '/trustedlogin/client/src', |
35 | 35 | ), |
36 | 36 | 'Psr\\Log\\' => |
37 | - array ( |
|
37 | + array( |
|
38 | 38 | 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', |
39 | 39 | ), |
40 | 40 | 'Katzgrau\\KLogger\\' => |
41 | - array ( |
|
41 | + array( |
|
42 | 42 | 0 => __DIR__ . '/..' . '/katzgrau/klogger/src', |
43 | 43 | ), |
44 | 44 | 'KatzGrau\\KLogger\\' => |
45 | - array ( |
|
45 | + array( |
|
46 | 46 | 0 => __DIR__ . '/../..' . '/src', |
47 | 47 | ), |
48 | 48 | ); |
49 | 49 | |
50 | - public static $classMap = array ( |
|
50 | + public static $classMap = array( |
|
51 | 51 | 'ComposerAutoloaderInitb5638313a52df4893eb45c04efdaa356' => __DIR__ . '/..' . '/trustedlogin/client/vendor/composer/autoload_real.php', |
52 | 52 | 'Composer\\Autoload\\ClassLoader' => __DIR__ . '/..' . '/trustedlogin/client/vendor/composer/ClassLoader.php', |
53 | 53 | 'Composer\\Autoload\\ComposerStaticInitb5638313a52df4893eb45c04efdaa356' => __DIR__ . '/..' . '/trustedlogin/client/vendor/composer/autoload_static.php', |
@@ -178,13 +178,13 @@ discard block |
||
178 | 178 | 'TypeError' => __DIR__ . '/..' . '/paragonie/random_compat/lib/error_polyfill.php', |
179 | 179 | ); |
180 | 180 | |
181 | - public static function getInitializer(ClassLoader $loader) |
|
181 | + public static function getInitializer( ClassLoader $loader ) |
|
182 | 182 | { |
183 | - return \Closure::bind(function () use ($loader) { |
|
183 | + return \Closure::bind( function() use ( $loader ) { |
|
184 | 184 | $loader->prefixLengthsPsr4 = ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::$prefixLengthsPsr4; |
185 | 185 | $loader->prefixDirsPsr4 = ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::$prefixDirsPsr4; |
186 | 186 | $loader->classMap = ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::$classMap; |
187 | 187 | |
188 | - }, null, ClassLoader::class); |
|
188 | + }, null, ClassLoader::class ); |
|
189 | 189 | } |
190 | 190 | } |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | { |
7 | 7 | private static $loader; |
8 | 8 | |
9 | - public static function loadClassLoader($class) |
|
9 | + public static function loadClassLoader( $class ) |
|
10 | 10 | { |
11 | - if ('Composer\Autoload\ClassLoader' === $class) { |
|
11 | + if ( 'Composer\Autoload\ClassLoader' === $class ) { |
|
12 | 12 | require __DIR__ . '/ClassLoader.php'; |
13 | 13 | } |
14 | 14 | } |
@@ -18,47 +18,47 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public static function getLoader() |
20 | 20 | { |
21 | - if (null !== self::$loader) { |
|
21 | + if ( null !== self::$loader ) { |
|
22 | 22 | return self::$loader; |
23 | 23 | } |
24 | 24 | |
25 | 25 | require __DIR__ . '/platform_check.php'; |
26 | 26 | |
27 | - spl_autoload_register(array('ComposerAutoloaderInit984ed95bef2b0e3d4eeb0208a88dc67d', 'loadClassLoader'), true, true); |
|
28 | - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); |
|
29 | - spl_autoload_unregister(array('ComposerAutoloaderInit984ed95bef2b0e3d4eeb0208a88dc67d', 'loadClassLoader')); |
|
27 | + spl_autoload_register( array( 'ComposerAutoloaderInit984ed95bef2b0e3d4eeb0208a88dc67d', 'loadClassLoader' ), true, true ); |
|
28 | + self::$loader = $loader = new \Composer\Autoload\ClassLoader( \dirname( \dirname( __FILE__ ) ) ); |
|
29 | + spl_autoload_unregister( array( 'ComposerAutoloaderInit984ed95bef2b0e3d4eeb0208a88dc67d', 'loadClassLoader' ) ); |
|
30 | 30 | |
31 | - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
|
32 | - if ($useStaticLoader) { |
|
31 | + $useStaticLoader = PHP_VERSION_ID >= 50600 && ! defined( 'HHVM_VERSION' ) && ( ! function_exists( 'zend_loader_file_encoded' ) || ! zend_loader_file_encoded() ); |
|
32 | + if ( $useStaticLoader ) { |
|
33 | 33 | require __DIR__ . '/autoload_static.php'; |
34 | 34 | |
35 | - call_user_func(\Composer\Autoload\ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::getInitializer($loader)); |
|
35 | + call_user_func( \Composer\Autoload\ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::getInitializer( $loader ) ); |
|
36 | 36 | } else { |
37 | 37 | $map = require __DIR__ . '/autoload_namespaces.php'; |
38 | - foreach ($map as $namespace => $path) { |
|
39 | - $loader->set($namespace, $path); |
|
38 | + foreach ( $map as $namespace => $path ) { |
|
39 | + $loader->set( $namespace, $path ); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | $map = require __DIR__ . '/autoload_psr4.php'; |
43 | - foreach ($map as $namespace => $path) { |
|
44 | - $loader->setPsr4($namespace, $path); |
|
43 | + foreach ( $map as $namespace => $path ) { |
|
44 | + $loader->setPsr4( $namespace, $path ); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | $classMap = require __DIR__ . '/autoload_classmap.php'; |
48 | - if ($classMap) { |
|
49 | - $loader->addClassMap($classMap); |
|
48 | + if ( $classMap ) { |
|
49 | + $loader->addClassMap( $classMap ); |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | - $loader->register(true); |
|
53 | + $loader->register( true ); |
|
54 | 54 | |
55 | - if ($useStaticLoader) { |
|
55 | + if ( $useStaticLoader ) { |
|
56 | 56 | $includeFiles = Composer\Autoload\ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::$files; |
57 | 57 | } else { |
58 | 58 | $includeFiles = require __DIR__ . '/autoload_files.php'; |
59 | 59 | } |
60 | - foreach ($includeFiles as $fileIdentifier => $file) { |
|
61 | - composerRequire984ed95bef2b0e3d4eeb0208a88dc67d($fileIdentifier, $file); |
|
60 | + foreach ( $includeFiles as $fileIdentifier => $file ) { |
|
61 | + composerRequire984ed95bef2b0e3d4eeb0208a88dc67d( $fileIdentifier, $file ); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | return $loader; |
@@ -70,10 +70,10 @@ discard block |
||
70 | 70 | * @param string $file |
71 | 71 | * @return void |
72 | 72 | */ |
73 | -function composerRequire984ed95bef2b0e3d4eeb0208a88dc67d($fileIdentifier, $file) |
|
73 | +function composerRequire984ed95bef2b0e3d4eeb0208a88dc67d( $fileIdentifier, $file ) |
|
74 | 74 | { |
75 | - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { |
|
76 | - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; |
|
75 | + if ( empty( $GLOBALS[ '__composer_autoload_files' ][ $fileIdentifier ] ) ) { |
|
76 | + $GLOBALS[ '__composer_autoload_files' ][ $fileIdentifier ] = true; |
|
77 | 77 | |
78 | 78 | require $file; |
79 | 79 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | return; |
25 | 25 | } |
26 | 26 | |
27 | - $this->widget_description = __('Display a Gravity Forms form.', 'gravityview' ); |
|
27 | + $this->widget_description = __( 'Display a Gravity Forms form.', 'gravityview' ); |
|
28 | 28 | |
29 | 29 | $default_values = array( |
30 | 30 | 'header' => 1, |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | add_filter( 'gravityview/widget/hide_until_searched/allowlist', array( $this, 'add_to_allowlist' ) ); |
67 | 67 | |
68 | - parent::__construct( __( 'Gravity Forms', 'gravityview' ) , 'gravityforms', $default_values, $settings ); |
|
68 | + parent::__construct( __( 'Gravity Forms', 'gravityview' ), 'gravityforms', $default_values, $settings ); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | function add_to_allowlist( $allowlist ) { |
110 | 110 | |
111 | - $allowlist[] = 'gravityforms'; |
|
111 | + $allowlist[ ] = 'gravityforms'; |
|
112 | 112 | |
113 | 113 | return $allowlist; |
114 | 114 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * @param string $content |
119 | 119 | * @param string $context |
120 | 120 | */ |
121 | - public function render_frontend( $widget_args, $content = '', $context = '') { |
|
121 | + public function render_frontend( $widget_args, $content = '', $context = '' ) { |
|
122 | 122 | |
123 | 123 | if ( ! $this->pre_render_frontend() ) { |
124 | 124 | return; |
@@ -52,7 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // The image source has ?raw=1; don't check for valid image extensions. |
55 | - $image_atts['validate_src'] = false; |
|
55 | + $image_atts[ 'validate_src' ] = false; |
|
56 | 56 | |
57 | 57 | return $image_atts; |
58 | 58 | } |
@@ -26,21 +26,21 @@ discard block |
||
26 | 26 | |
27 | 27 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
28 | 28 | |
29 | - unset( $field_options['search_filter'] ); |
|
29 | + unset( $field_options[ 'search_filter' ] ); |
|
30 | 30 | |
31 | - if( 'edit' === $context ) { |
|
31 | + if ( 'edit' === $context ) { |
|
32 | 32 | return $field_options; |
33 | 33 | } |
34 | 34 | |
35 | - $add_options['link_to_file'] = array( |
|
35 | + $add_options[ 'link_to_file' ] = array( |
|
36 | 36 | 'type' => 'checkbox', |
37 | 37 | 'label' => __( 'Display as a Link:', 'gravityview' ), |
38 | - 'desc' => __('Display the uploaded files as links, rather than embedded content.', 'gravityview'), |
|
38 | + 'desc' => __( 'Display the uploaded files as links, rather than embedded content.', 'gravityview' ), |
|
39 | 39 | 'value' => false, |
40 | 40 | 'merge_tags' => false, |
41 | 41 | ); |
42 | 42 | |
43 | - $add_options['image_width'] = array( |
|
43 | + $add_options[ 'image_width' ] = array( |
|
44 | 44 | 'type' => 'text', |
45 | 45 | 'label' => __( 'Custom Width:', 'gravityview' ), |
46 | 46 | 'desc' => __( 'Override the default image width (250).', 'gravityview' ), |
@@ -158,14 +158,14 @@ discard block |
||
158 | 158 | $base_id = null; |
159 | 159 | |
160 | 160 | $is_single = gravityview_get_context() === 'single'; |
161 | - $lightbox = ! empty( $gravityview_view->atts['lightbox'] ); |
|
161 | + $lightbox = ! empty( $gravityview_view->atts[ 'lightbox' ] ); |
|
162 | 162 | $field_compat = $gravityview_view->getCurrentField(); |
163 | 163 | } |
164 | 164 | |
165 | 165 | $output_arr = array(); |
166 | 166 | |
167 | 167 | // Get an array of file paths for the field. |
168 | - $file_paths = \GV\Utils::get( $field , 'multipleFiles' ) ? json_decode( $value ) : array( $value ); |
|
168 | + $file_paths = \GV\Utils::get( $field, 'multipleFiles' ) ? json_decode( $value ) : array( $value ); |
|
169 | 169 | |
170 | 170 | // The $value JSON was probably truncated; let's check lead_detail_long. |
171 | 171 | if ( ! is_array( $file_paths ) ) { |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $rendered = null; |
186 | 186 | |
187 | 187 | // If the site is HTTPS, use HTTPS |
188 | - if ( function_exists('set_url_scheme') ) { |
|
188 | + if ( function_exists( 'set_url_scheme' ) ) { |
|
189 | 189 | $file_path = set_url_scheme( $file_path ); |
190 | 190 | } |
191 | 191 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $file_path_info = pathinfo( $file_path ); |
197 | 197 | |
198 | 198 | // If pathinfo() gave us the extension of the file, run the switch statement using that. |
199 | - $extension = empty( $file_path_info['extension'] ) ? NULL : strtolower( $file_path_info['extension'] ); |
|
199 | + $extension = empty( $file_path_info[ 'extension' ] ) ? NULL : strtolower( $file_path_info[ 'extension' ] ); |
|
200 | 200 | |
201 | 201 | /** |
202 | 202 | * @filter `gravityview/fields/fileupload/extension` Modify the file extension before it's used in display logic |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | */ |
207 | 207 | $extension = apply_filters( 'gravityview/fields/fileupload/extension', $extension, $file_path ); |
208 | 208 | |
209 | - $basename = $file_path_info['basename']; |
|
209 | + $basename = $file_path_info[ 'basename' ]; |
|
210 | 210 | |
211 | 211 | // Get the secure download URL |
212 | 212 | $is_secure = false; |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | */ |
247 | 247 | $audio_settings = apply_filters( 'gravityview_audio_settings', array( |
248 | 248 | 'src' => $insecure_file_path, // Needs to be insecure path so WP can parse extension |
249 | - 'class' => 'wp-audio-shortcode gv-audio gv-field-id-'.$field_settings['id'] |
|
249 | + 'class' => 'wp-audio-shortcode gv-audio gv-field-id-' . $field_settings[ 'id' ] |
|
250 | 250 | ), $context ); |
251 | 251 | |
252 | 252 | /** |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | */ |
276 | 276 | $video_settings = apply_filters( 'gravityview_video_settings', array( |
277 | 277 | 'src' => $insecure_file_path, // Needs to be insecure path so WP can parse extension |
278 | - 'class' => 'wp-video-shortcode gv-video gv-field-id-'.$field_settings['id'] |
|
278 | + 'class' => 'wp-video-shortcode gv-video gv-field-id-' . $field_settings[ 'id' ] |
|
279 | 279 | ), $context ); |
280 | 280 | |
281 | 281 | /** |
@@ -299,20 +299,20 @@ discard block |
||
299 | 299 | $file_path = add_query_arg( array( 'gv-iframe' => 'true' ), $file_path ); |
300 | 300 | } |
301 | 301 | |
302 | - $field_settings['link_to_file'] = true; |
|
302 | + $field_settings[ 'link_to_file' ] = true; |
|
303 | 303 | |
304 | 304 | // Images |
305 | 305 | } else if ( in_array( $extension, GravityView_Image::get_image_extensions() ) ) { |
306 | 306 | $width = \GV\Utils::get( $field_settings, 'image_width', 250 ); |
307 | 307 | $image_atts = array( |
308 | 308 | 'src' => $file_path, |
309 | - 'class' => 'gv-image gv-field-id-' . $field_settings['id'], |
|
310 | - 'alt' => $field_settings['label'], |
|
311 | - 'width' => ( $is_single ? null : ( $width ? $width: 250 ) ) |
|
309 | + 'class' => 'gv-image gv-field-id-' . $field_settings[ 'id' ], |
|
310 | + 'alt' => $field_settings[ 'label' ], |
|
311 | + 'width' => ( $is_single ? null : ( $width ? $width : 250 ) ) |
|
312 | 312 | ); |
313 | 313 | |
314 | 314 | if ( $is_secure ) { |
315 | - $image_atts['validate_src'] = false; |
|
315 | + $image_atts[ 'validate_src' ] = false; |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | /** |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | |
334 | 334 | unset( $gv_entry ); |
335 | 335 | |
336 | - if ( $lightbox && empty( $field_settings['show_as_link'] ) ) { |
|
336 | + if ( $lightbox && empty( $field_settings[ 'show_as_link' ] ) ) { |
|
337 | 337 | |
338 | 338 | $lightbox_link_atts = array( |
339 | 339 | 'rel' => sprintf( "%s-%s", $gv_class, $entry_slug ), |
@@ -348,13 +348,13 @@ discard block |
||
348 | 348 | } |
349 | 349 | |
350 | 350 | // Show as link should render the image regardless. |
351 | - if ( ! empty( $field_settings['show_as_link'] ) ) { |
|
351 | + if ( ! empty( $field_settings[ 'show_as_link' ] ) ) { |
|
352 | 352 | $text = $rendered; |
353 | 353 | } |
354 | 354 | } |
355 | 355 | // For all other non-media file types (ZIP, for example), always show as a link regardless of setting. |
356 | 356 | else { |
357 | - $field_settings['link_to_file'] = true; |
|
357 | + $field_settings[ 'link_to_file' ] = true; |
|
358 | 358 | $disable_lightbox = true; |
359 | 359 | } |
360 | 360 | |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | $disable_wrapped_link = apply_filters( 'gravityview/fields/fileupload/disable_link', false, $field_compat, $context ); |
371 | 371 | |
372 | 372 | // Output textualized content where |
373 | - if ( ! $disable_wrapped_link && ( ! empty( $field_settings['link_to_file'] ) || ! empty( $field_settings['show_as_link'] ) ) ) { |
|
373 | + if ( ! $disable_wrapped_link && ( ! empty( $field_settings[ 'link_to_file' ] ) || ! empty( $field_settings[ 'show_as_link' ] ) ) ) { |
|
374 | 374 | /** |
375 | 375 | * Modify the link text (defaults to the file name) |
376 | 376 | * |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | */ |
384 | 384 | $content = apply_filters( 'gravityview/fields/fileupload/link_content', $text, $field_compat, $context ); |
385 | 385 | |
386 | - if ( empty( $field_settings['show_as_link'] ) ) { |
|
386 | + if ( empty( $field_settings[ 'show_as_link' ] ) ) { |
|
387 | 387 | /** |
388 | 388 | * @filter `gravityview/fields/fileupload/link_atts` Modify the link attributes for a file upload field |
389 | 389 | * @since 2.0 Added $context |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | $content = empty( $rendered ) ? $text : $rendered; |
405 | 405 | } |
406 | 406 | |
407 | - $output_arr[] = array( |
|
407 | + $output_arr[ ] = array( |
|
408 | 408 | 'file_path' => $file_path, |
409 | 409 | 'content' => $content |
410 | 410 | ); |