Passed
Branch options (6cb94b)
by Dominik
06:35
created
Components/FormNewsletter/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 ]);
22 22
 
23 23
 
24
-add_action('Flynt/afterRegisterComponents', function () {
24
+add_action('Flynt/afterRegisterComponents', function() {
25 25
     Options::addTranslatable('FormNewsletter', [
26 26
         [
27 27
             'label' => '',
Please login to merge, or discard this patch.
Components/FormContactForm7/functions.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 add_filter('wpcf7_load_js', '__return_false');
8 8
 add_filter('wpcf7_load_css', '__return_false');
9 9
 
10
-add_filter('Flynt/addComponentData?name=FormContactForm7', function ($data) {
10
+add_filter('Flynt/addComponentData?name=FormContactForm7', function($data) {
11 11
     function_exists('wpcf7_enqueue_scripts') && enqueueWpcf7Scripts();
12 12
     function_exists('wpcf7_enqueue_styles') && wpcf7_enqueue_styles();
13 13
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 
53 53
 remove_action('wpcf7_init', 'wpcf7_add_form_tag_submit', 10, 0);
54 54
 
55
-add_action('wpcf7_init', function () {
56
-    wpcf7_add_form_tag('submit', function ($tag) {
55
+add_action('wpcf7_init', function() {
56
+    wpcf7_add_form_tag('submit', function($tag) {
57 57
         $class = wpcf7_form_controls_class($tag->type, 'button');
58 58
 
59 59
         $atts = [];
@@ -174,12 +174,12 @@  discard block
 block discarded – undo
174 174
     [submit "Submit"]
175 175
   </div>
176 176
 </div>
177
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Simple field</h4> '.htmlspecialchars('
177
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Simple field</h4> ' . htmlspecialchars('
178 178
 <div class="form-group">
179 179
     <label for="yourCompany">Company</label>
180 180
     [text* your-company id:yourCompany placeholder "bleech"]
181 181
 </div>
182
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row</h4> '.htmlspecialchars('
182
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row</h4> ' . htmlspecialchars('
183 183
 <div class="form-row-2">
184 184
     <div class="form-group">
185 185
         <label for="firstName">First Name</label>
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         [text* last-name id:lastName placeholder "Winchester"]
191 191
     </div>
192 192
 </div>
193
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Three columns row</h4> '.htmlspecialchars('
193
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Three columns row</h4> ' . htmlspecialchars('
194 194
 <div class="form-row-3">
195 195
     <div class="form-group">
196 196
         <label for="firstName">First Name</label>
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         [email* your-email id:yourEmail placeholder "[email protected]"]
206 206
     </div>
207 207
 </div>
208
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row (left column bigger than right)</h4> '.htmlspecialchars('
208
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row (left column bigger than right)</h4> ' . htmlspecialchars('
209 209
 <div class="form-row-2-lg-left">
210 210
     <div class="form-group">
211 211
         <label for="yourAddress">Address</label>
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         [number zipcode id:zipCode placeholder "10178"]
217 217
     </div>
218 218
 </div>
219
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row (right column bigger than left)</h4> '.htmlspecialchars('
219
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row (right column bigger than left)</h4> ' . htmlspecialchars('
220 220
 <div class="form-row-2-lg-right">
221 221
     <div class="form-group">
222 222
         <label for="phoneCode">Code</label>
@@ -227,49 +227,49 @@  discard block
 block discarded – undo
227 227
         [tel mobile-phone id:mobilePhone placeholder "767-3842"]
228 228
     </div>
229 229
 </div>
230
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Textarea</h4> '.htmlspecialchars('
230
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Textarea</h4> ' . htmlspecialchars('
231 231
 <div class="form-group">
232 232
     <label for="yourMessage">Your Message</label>
233 233
     [textarea your-message id:yourMessage placeholder "Message here"]
234 234
 </div>
235
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">URL field</h4> '.htmlspecialchars('
235
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">URL field</h4> ' . htmlspecialchars('
236 236
 <div class="form-group">
237 237
     <label for="yourWebsite">Website</label>
238 238
     [url website id:yourWebsite placeholder "http://"]
239 239
 </div>
240
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Date field</h4> '.htmlspecialchars('
240
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Date field</h4> ' . htmlspecialchars('
241 241
 <div class="form-group">
242 242
     <label for="yourDate">Date</label>
243 243
     [date date id:yourDate]
244 244
 </div>
245
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Checkbox</h4> '.htmlspecialchars('
245
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Checkbox</h4> ' . htmlspecialchars('
246 246
 <div class="form-group">
247 247
     [checkbox checkbox-555 use_label_element "some " "another" "else"]
248 248
 </div>
249
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Radio</h4> '.htmlspecialchars('
249
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Radio</h4> ' . htmlspecialchars('
250 250
 <div class="form-group">
251 251
     [radio radio-647 default:1 use_label_element "some " "else" "another"]
252 252
 </div>
253
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Acceptance</h4> '.htmlspecialchars('
253
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Acceptance</h4> ' . htmlspecialchars('
254 254
 <div class="form-group">
255 255
     [acceptance acceptance-782 use_label_element optional]
256 256
         By default, an acceptance checkbox is a different mechanism than
257 257
         general input validation, and it runs after all validation succeeds.
258 258
     [/acceptance]
259 259
 </div>
260
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Quiz field</h4> '.htmlspecialchars('
260
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Quiz field</h4> ' . htmlspecialchars('
261 261
 <div class="form-group label-wrap">
262 262
     [quiz quiz-413 "1+1=?|1" "1+2=?|3" "1+3=?|4"]
263 263
 </div>
264
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">File field</h4> '.htmlspecialchars('
264
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">File field</h4> ' . htmlspecialchars('
265 265
 <div class="form-group">
266 266
     [file file-838]
267 267
 </div>
268
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Submit button</h4> '.htmlspecialchars('
268
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Submit button</h4> ' . htmlspecialchars('
269 269
 <div class="form-button">
270 270
     [submit "Send Message"]
271 271
 </div>
272
-').'
272
+') . '
273 273
 </pre>
274 274
                 ',
275 275
                 'new_lines' => 'wpautop',
Please login to merge, or discard this patch.
Components/FeatureAdminComponentScreenshots/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 use Flynt\ComponentManager;
5 5
 use Flynt\Utils\Asset;
6 6
 
7
-add_action('admin_enqueue_scripts', function () {
7
+add_action('admin_enqueue_scripts', function() {
8 8
     $data = [
9 9
         'templateDirectoryUri' => get_template_directory_uri() . '/dist',
10 10
     ];
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 if (class_exists('acf')) {
15 15
     if (is_admin()) {
16 16
         // add image to the flexible content component name
17
-        add_filter('acf/fields/flexible_content/layout_title', function ($title, $field, $layout, $i) {
17
+        add_filter('acf/fields/flexible_content/layout_title', function($title, $field, $layout, $i) {
18 18
             $componentManager = ComponentManager::getInstance();
19 19
             $componentName = ucfirst($layout['name']);
20 20
             $componentPathFull = $componentManager->getComponentDirPath($componentName);
Please login to merge, or discard this patch.
Components/HeroSlider/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt\Api;
6 6
 use Flynt\Utils\Options;
7 7
 
8
-add_filter('Flynt/addComponentData?name=HeroSlider', function ($data) {
8
+add_filter('Flynt/addComponentData?name=HeroSlider', function($data) {
9 9
     $translatableOptions = Options::getTranslatable('feature', 'SliderOptions');
10 10
     $data['jsonData'] = [
11 11
         'options' => array_merge($translatableOptions, $data['options']),
Please login to merge, or discard this patch.
Components/SliderImages/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt\Api;
6 6
 use Flynt\Utils\Options;
7 7
 
8
-add_filter('Flynt/addComponentData?name=SliderImages', function ($data) {
8
+add_filter('Flynt/addComponentData?name=SliderImages', function($data) {
9 9
     $translatableOptions = Options::getTranslatable('feature', 'SliderOptions');
10 10
     $data['jsonData'] = [
11 11
         'options' => array_merge($translatableOptions, $data['options']),
Please login to merge, or discard this patch.
Components/SliderImagesCentered/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt\Api;
6 6
 use Flynt\Utils\Options;
7 7
 
8
-add_filter('Flynt/addComponentData?name=SliderImagesCentered', function ($data) {
8
+add_filter('Flynt/addComponentData?name=SliderImagesCentered', function($data) {
9 9
     $translatableOptions = Options::getTranslatable('feature', 'SliderOptions');
10 10
     $data['jsonData'] = [
11 11
         'options' => array_merge($translatableOptions, $data['options']),
Please login to merge, or discard this patch.
inc/acf.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 use Flynt\Utils\Options;
5 5
 
6
-add_filter('pre_http_request', function ($preempt, $args, $url) {
6
+add_filter('pre_http_request', function($preempt, $args, $url) {
7 7
     if (strpos($url, 'https://www.youtube.com/oembed') !== false || strpos($url, 'https://vimeo.com/api/oembed') !== false) {
8 8
         $response = wp_cache_get($url, 'oembedCache');
9 9
         if (!empty($response)) {
@@ -13,14 +13,14 @@  discard block
 block discarded – undo
13 13
     return false;
14 14
 }, 10, 3);
15 15
 
16
-add_filter('http_response', function ($response, $args, $url) {
16
+add_filter('http_response', function($response, $args, $url) {
17 17
     if (strpos($url, 'https://www.youtube.com/oembed') !== false || strpos($url, 'https://vimeo.com/api/oembed') !== false) {
18 18
         wp_cache_set($url, $response, 'oembedCache');
19 19
     }
20 20
     return $response;
21 21
 }, 10, 3);
22 22
 
23
-add_filter('acf/fields/google_map/api', function ($api) {
23
+add_filter('acf/fields/google_map/api', function($api) {
24 24
     $apiKey = Options::getGlobal('component', 'Acf', 'googleMapsApiKey');
25 25
     if ($apiKey) {
26 26
         $api['key'] = $apiKey;
Please login to merge, or discard this patch.