@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\'); |
8 | 8 | |
9 | -add_action('Flynt/afterRegisterFeatures', function () { |
|
9 | +add_action('Flynt/afterRegisterFeatures', function() { |
|
10 | 10 | $componentManager = Flynt\ComponentManager::getInstance(); |
11 | 11 | $componentWhitelist = []; |
12 | 12 | if (isset($_GET['component']) && !empty($_GET['component'])) { |
@@ -43,21 +43,21 @@ discard block |
||
43 | 43 | { |
44 | 44 | $type = gettype($data); |
45 | 45 | $output = json_encode($data); |
46 | - $result = "<script>console.log({$output});</script>\n"; |
|
46 | + $result = "<script>console.log({$output});</script>\n"; |
|
47 | 47 | echoDebug($result, $postpone); |
48 | 48 | } |
49 | 49 | |
50 | 50 | function consoleTable($data, $postpone = true) |
51 | 51 | { |
52 | 52 | $output = json_encode($data); |
53 | - $result = "<script>console.table({$output});</script>\n"; |
|
53 | + $result = "<script>console.table({$output});</script>\n"; |
|
54 | 54 | echoDebug($result, $postpone); |
55 | 55 | } |
56 | 56 | |
57 | 57 | function echoDebug($data, $postpone) |
58 | 58 | { |
59 | 59 | if ($postpone) { |
60 | - add_action('wp_footer', function () use ($data) { |
|
60 | + add_action('wp_footer', function() use ($data) { |
|
61 | 61 | echo $data; |
62 | 62 | }, 30); |
63 | 63 | } else { |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | add_action('Flynt/afterRegisterFeatures', 'Flynt\Features\Acf\Loader::init'); |
17 | 17 | |
18 | -add_filter('pre_http_request', function ($preempt, $args, $url) { |
|
18 | +add_filter('pre_http_request', function($preempt, $args, $url) { |
|
19 | 19 | if (strpos($url, 'https://www.youtube.com/oembed') !== false || strpos($url, 'https://vimeo.com/api/oembed') !== false) { |
20 | 20 | $response = wp_cache_get($url, 'oembedCache'); |
21 | 21 | if (!empty($response)) { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | return false; |
26 | 26 | }, 10, 3); |
27 | 27 | |
28 | -add_filter('http_response', function ($response, $args, $url) { |
|
28 | +add_filter('http_response', function($response, $args, $url) { |
|
29 | 29 | if (strpos($url, 'https://www.youtube.com/oembed') !== false || strpos($url, 'https://vimeo.com/api/oembed') !== false) { |
30 | 30 | wp_cache_set($url, $response, 'oembedCache'); |
31 | 31 | } |