@@ -108,17 +108,17 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function allowed_atts( $atts = array() ) { |
110 | 110 | |
111 | - $atts['data-fancybox'] = null; |
|
112 | - $atts['data-fancybox-trigger'] = null; |
|
113 | - $atts['data-fancybox-index'] = null; |
|
114 | - $atts['data-src'] = null; |
|
115 | - $atts['data-type'] = null; |
|
116 | - $atts['data-width'] = null; |
|
117 | - $atts['data-height'] = null; |
|
118 | - $atts['data-srcset'] = null; |
|
119 | - $atts['data-caption'] = null; |
|
120 | - $atts['data-options'] = null; |
|
121 | - $atts['data-filter'] = null; |
|
111 | + $atts[ 'data-fancybox' ] = null; |
|
112 | + $atts[ 'data-fancybox-trigger' ] = null; |
|
113 | + $atts[ 'data-fancybox-index' ] = null; |
|
114 | + $atts[ 'data-src' ] = null; |
|
115 | + $atts[ 'data-type' ] = null; |
|
116 | + $atts[ 'data-width' ] = null; |
|
117 | + $atts[ 'data-height' ] = null; |
|
118 | + $atts[ 'data-srcset' ] = null; |
|
119 | + $atts[ 'data-caption' ] = null; |
|
120 | + $atts[ 'data-options' ] = null; |
|
121 | + $atts[ 'data-filter' ] = null; |
|
122 | 122 | |
123 | 123 | return $atts; |
124 | 124 | } |
@@ -133,23 +133,23 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | // Prevent empty content from getting added to the lightbox gallery |
136 | - if ( is_array( $additional_details ) && empty( $additional_details['file_path'] ) ) { |
|
136 | + if ( is_array( $additional_details ) && empty( $additional_details[ 'file_path' ] ) ) { |
|
137 | 137 | return $link_atts; |
138 | 138 | } |
139 | 139 | |
140 | 140 | // Prevent empty content from getting added to the lightbox gallery |
141 | - if ( is_array( $additional_details ) && ! empty( $additional_details['disable_lightbox'] ) ) { |
|
141 | + if ( is_array( $additional_details ) && ! empty( $additional_details[ 'disable_lightbox' ] ) ) { |
|
142 | 142 | return $link_atts; |
143 | 143 | } |
144 | 144 | |
145 | - $link_atts['class'] = \GV\Utils::get( $link_atts, 'class' ) . ' gravityview-fancybox'; |
|
145 | + $link_atts[ 'class' ] = \GV\Utils::get( $link_atts, 'class' ) . ' gravityview-fancybox'; |
|
146 | 146 | |
147 | - $link_atts['class'] = gravityview_sanitize_html_class( $link_atts['class'] ); |
|
147 | + $link_atts[ 'class' ] = gravityview_sanitize_html_class( $link_atts[ 'class' ] ); |
|
148 | 148 | |
149 | 149 | if ( $context && ! empty( $context->field->field ) ) { |
150 | 150 | if ( $context->field->field->multipleFiles ) { |
151 | 151 | $entry = $context->entry->as_entry(); |
152 | - $link_atts['data-fancybox'] = 'gallery-' . sprintf( "%s-%s-%s", $entry['form_id'], $context->field->ID, $context->entry->get_slug() ); |
|
152 | + $link_atts[ 'data-fancybox' ] = 'gallery-' . sprintf( "%s-%s-%s", $entry[ 'form_id' ], $context->field->ID, $context->entry->get_slug() ); |
|
153 | 153 | } |
154 | 154 | } |
155 | 155 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * @see https://fancyapps.com/docs/ui/fancybox#media-types |
161 | 161 | */ |
162 | 162 | if ( false !== strpos( $file_path, 'gv-iframe' ) ) { |
163 | - $link_atts['data-type'] = 'pdf'; |
|
163 | + $link_atts[ 'data-type' ] = 'pdf'; |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | return $link_atts; |