@@ -16,12 +16,12 @@ discard block |
||
16 | 16 | function disallowRobots() |
17 | 17 | { |
18 | 18 | if (defined('WPSEO_VERSION')) { |
19 | - add_filter('wpseo_robots', function () { |
|
19 | + add_filter('wpseo_robots', function() { |
|
20 | 20 | return "noindex,nofollow"; |
21 | 21 | }); |
22 | 22 | } else { |
23 | 23 | remove_action('wp_head', 'noindex', 1); |
24 | - add_action('wp_head', function () { |
|
24 | + add_action('wp_head', function() { |
|
25 | 25 | echo "<meta name='robots' content='noindex,nofollow' />\n"; |
26 | 26 | }); |
27 | 27 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $rules = get_option('rewrite_rules'); |
38 | 38 | |
39 | - if (! isset($rules["{$routeName}/(.*?)/?$"])) { |
|
39 | + if (!isset($rules["{$routeName}/(.*?)/?$"])) { |
|
40 | 40 | flush_rewrite_rules(); |
41 | 41 | } |
42 | 42 | } |
@@ -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 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | if (is_admin()) { |
16 | 16 | // adds buttons to collapse/expand components |
17 | - add_filter('acf/get_field_label', function ($label, $field) { |
|
17 | + add_filter('acf/get_field_label', function($label, $field) { |
|
18 | 18 | if ($field['type'] === 'flexible_content') { |
19 | 19 | $label .= '<span class="flexible-content-controls">'; |
20 | 20 | $label .= '<span class="flexible-content-control"><a class="acf-icon small -collapse collapse-all" title="collapse all"></a></span>'; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | public static function init() |
10 | 10 | { |
11 | - add_filter('acf/fields/google_map/api', function ($api) { |
|
11 | + add_filter('acf/fields/google_map/api', function($api) { |
|
12 | 12 | $apiKey = Options::get('globalOptions', 'feature', 'Acf', 'googleMapsApiKey'); |
13 | 13 | if ($apiKey) { |
14 | 14 | $api['key'] = $apiKey; |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use ACFComposer\ACFComposer; |
4 | 4 | |
5 | -add_action('Flynt/afterRegisterComponents', function () { |
|
5 | +add_action('Flynt/afterRegisterComponents', function() { |
|
6 | 6 | ACFComposer::registerFieldGroup([ |
7 | 7 | 'name' => 'postComponents', |
8 | 8 | 'title' => 'Post Components', |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use ACFComposer\ACFComposer; |
4 | 4 | |
5 | -add_action('Flynt/afterRegisterComponents', function () { |
|
5 | +add_action('Flynt/afterRegisterComponents', function() { |
|
6 | 6 | ACFComposer::registerFieldGroup([ |
7 | 7 | 'name' => 'pageComponents', |
8 | 8 | 'title' => 'Page Components', |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Timber\Timber; |
6 | 6 | use Timber\Post; |
7 | 7 | |
8 | -add_filter('the_password_form', function ($output) { |
|
8 | +add_filter('the_password_form', function($output) { |
|
9 | 9 | $context = Timber::get_context(); |
10 | 10 | $context['form'] = [ |
11 | 11 | 'url' => site_url('/wp-login.php?action=postpass', 'login_post') |
@@ -14,7 +14,7 @@ |
||
14 | 14 | function addOptionsToComponent($data, $componentName) |
15 | 15 | { |
16 | 16 | // get fields for this component |
17 | - $options = array_reduce(array_keys(Options::OPTION_TYPES), function ($carry, $optionType) use ($componentName) { |
|
17 | + $options = array_reduce(array_keys(Options::OPTION_TYPES), function($carry, $optionType) use ($componentName) { |
|
18 | 18 | return array_merge($carry, Options::get($optionType, 'Component', $componentName)); |
19 | 19 | }, []); |
20 | 20 | // don't overwrite existing data |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | public static function setTemplateDirectory() |
44 | 44 | { |
45 | - add_action('after_switch_theme', function () { |
|
45 | + add_action('after_switch_theme', function() { |
|
46 | 46 | $stylesheet = get_option('stylesheet'); |
47 | 47 | |
48 | 48 | if (basename($stylesheet) !== 'templates') { |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | } |
51 | 51 | }); |
52 | 52 | |
53 | - add_filter('stylesheet', function ($stylesheet) { |
|
53 | + add_filter('stylesheet', function($stylesheet) { |
|
54 | 54 | return dirname($stylesheet); |
55 | 55 | }); |
56 | 56 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | if (!$acfActive || !$flyntCoreActive) { |
72 | - add_filter('template_include', function () { |
|
72 | + add_filter('template_include', function() { |
|
73 | 73 | die( |
74 | 74 | 'One or more required plugins are not activated! Please <a href="' |
75 | 75 | . esc_url(admin_url('plugins.php')) |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | protected static function notifyRequiredPluginIsMissing($pluginName) |
85 | 85 | { |
86 | - add_action('admin_notices', function () use ($pluginName) { |
|
86 | + add_action('admin_notices', function() use ($pluginName) { |
|
87 | 87 | echo "<div class=\"error\"><p>${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\"" |
88 | 88 | . esc_url(admin_url('plugins.php')) . "\">plugin page</a>.</p></div>"; |
89 | 89 | }); |