@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | return $wpdb->prefix . TABLE_NAME; |
18 | 18 | } |
19 | 19 | |
20 | -call_user_func(function () { |
|
20 | +call_user_func(function() { |
|
21 | 21 | $optionName = TABLE_NAME . '_db_version'; |
22 | 22 | |
23 | 23 | $installedVersion = get_option($optionName); |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | return $uploadDir['relative']; |
47 | 47 | } |
48 | 48 | |
49 | -add_action('timber/twig/filters', function ($twig) { |
|
49 | +add_action('timber/twig/filters', function($twig) { |
|
50 | 50 | $twig->addFilter( |
51 | - new TwigFilter('resizeDynamic', function ( |
|
51 | + new TwigFilter('resizeDynamic', function( |
|
52 | 52 | $src, |
53 | 53 | $w, |
54 | 54 | $h = 0, |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | global $flyntResizedImages; |
74 | 74 | if (empty($flyntResizedImages)) { |
75 | - add_action('shutdown', function () { |
|
75 | + add_action('shutdown', function() { |
|
76 | 76 | storeResizedUrls(); |
77 | 77 | }, -1); |
78 | 78 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | return $twig; |
92 | 92 | }); |
93 | 93 | |
94 | -Routes::map(IMAGE_ROUTE, function () { |
|
94 | +Routes::map(IMAGE_ROUTE, function() { |
|
95 | 95 | $uploadDirRelative = getRelativeUploadDir(); |
96 | 96 | $src = str_replace( |
97 | 97 | trailingslashit($uploadDirRelative) . IMAGE_PATH_SEPARATOR, |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | if ($localDev) { |
116 | 116 | $src = http_build_url($homeUrl, ['path' => $urlParts['path']]); |
117 | 117 | } |
118 | - $moveImageFunction = function ($location) use ($uploadDirRelative) { |
|
118 | + $moveImageFunction = function($location) use ($uploadDirRelative) { |
|
119 | 119 | return str_replace( |
120 | 120 | $uploadDirRelative, |
121 | 121 | trailingslashit($uploadDirRelative) . IMAGE_PATH_SEPARATOR, |
@@ -191,11 +191,11 @@ discard block |
||
191 | 191 | |
192 | 192 | add_filter('mod_rewrite_rules', 'Flynt\\TimberDynamicResize\\addRewriteRule'); |
193 | 193 | |
194 | -add_action('after_switch_theme', function () { |
|
194 | +add_action('after_switch_theme', function() { |
|
195 | 195 | add_action('shutdown', 'flush_rewrite_rules'); |
196 | 196 | }); |
197 | 197 | |
198 | -add_action('switch_theme', function () { |
|
198 | +add_action('switch_theme', function() { |
|
199 | 199 | remove_filter('mod_rewrite_rules', 'Flynt\\TimberDynamicResize\\addRewriteRule'); |
200 | 200 | flush_rewrite_rules(); |
201 | 201 | }); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | add_filter('the_password_form', function ($output) { |
9 | 9 | $context = Timber::get_context(); |
10 | 10 | $context['form'] = [ |
11 | - 'url' => site_url('/wp-login.php?action=postpass', 'login_post') |
|
11 | + 'url' => site_url('/wp-login.php?action=postpass', 'login_post') |
|
12 | 12 | ]; |
13 | 13 | |
14 | 14 | return Timber::fetch('index.twig', $context); |
@@ -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') |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | $rules = get_option('rewrite_rules'); |
22 | 22 | |
23 | - if (! isset($rules["{$routeName}/(.*?)/?$"])) { |
|
23 | + if (!isset($rules["{$routeName}/(.*?)/?$"])) { |
|
24 | 24 | flush_rewrite_rules(); |
25 | 25 | } |
26 | 26 | } |
@@ -28,12 +28,12 @@ discard block |
||
28 | 28 | function disallowRobots() |
29 | 29 | { |
30 | 30 | if (defined('WPSEO_VERSION')) { |
31 | - add_filter('wpseo_robots', function () { |
|
31 | + add_filter('wpseo_robots', function() { |
|
32 | 32 | return "noindex,nofollow"; |
33 | 33 | }); |
34 | 34 | } else { |
35 | 35 | remove_action('wp_head', 'noindex', 1); |
36 | - add_action('wp_head', function () { |
|
36 | + add_action('wp_head', function() { |
|
37 | 37 | echo "<meta name='robots' content='noindex,nofollow' />\n"; |
38 | 38 | }); |
39 | 39 | } |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | use Flynt\Utils\Asset; |
9 | 9 | use Parsedown; |
10 | 10 | |
11 | -add_filter('Flynt/addComponentData?name=ListComponents', function ($data) { |
|
11 | +add_filter('Flynt/addComponentData?name=ListComponents', function($data) { |
|
12 | 12 | if (!empty($data['componentBlocks'])) { |
13 | 13 | $templatePaths = [ |
14 | 14 | 'dir' => trailingslashit(get_template_directory()), |
15 | 15 | 'uri' => trailingslashit(get_template_directory_uri()), |
16 | 16 | ]; |
17 | - $data['componentBlocks'] = array_map(function ($block) use ($templatePaths) { |
|
17 | + $data['componentBlocks'] = array_map(function($block) use ($templatePaths) { |
|
18 | 18 | $block['component'] = substr($block['component'], strpos($block['component'], 'Components/')); |
19 | 19 | |
20 | 20 | $imagePath = $templatePaths['dir'] . $block['component'] . 'screenshot.png'; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | return $data; |
46 | 46 | }); |
47 | 47 | |
48 | -add_filter('acf/load_field/name=component', function ($field) { |
|
48 | +add_filter('acf/load_field/name=component', function($field) { |
|
49 | 49 | $componentManager = ComponentManager::getInstance(); |
50 | 50 | $field['choices'] = array_flip($componentManager->getAll()); |
51 | 51 | return $field; |
@@ -4,12 +4,12 @@ discard block |
||
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 | $componentManager = ComponentManager::getInstance(); |
9 | 9 | $templateDirectory = get_template_directory(); |
10 | 10 | $data = [ |
11 | 11 | 'templateDirectoryUri' => get_template_directory_uri(), |
12 | - 'components' => array_map(function ($componentPath) use ($templateDirectory) { |
|
12 | + 'components' => array_map(function($componentPath) use ($templateDirectory) { |
|
13 | 13 | return str_replace($templateDirectory, '', $componentPath); |
14 | 14 | }, $componentManager->getAll()), |
15 | 15 | ]; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | if (class_exists('acf')) { |
20 | 20 | if (is_admin()) { |
21 | 21 | // add image to the flexible content component name |
22 | - add_filter('acf/fields/flexible_content/layout_title', function ($title, $field, $layout, $i) { |
|
22 | + add_filter('acf/fields/flexible_content/layout_title', function($title, $field, $layout, $i) { |
|
23 | 23 | $componentManager = ComponentManager::getInstance(); |
24 | 24 | $componentName = ucfirst($layout['name']); |
25 | 25 | $componentPathFull = $componentManager->getComponentDirPath($componentName); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\FieldVariables; |
6 | 6 | use Flynt\Utils\Oembed; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=BlockVideoOembed', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=BlockVideoOembed', function($data) { |
|
9 | 9 | $data['video'] = Oembed::setSrcAsDataAttribute( |
10 | 10 | $data['oembed'], |
11 | 11 | [ |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\FieldVariables; |
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('SliderOptions'); |
10 | 10 | $data['jsonData'] = [ |
11 | 11 | 'options' => array_merge($translatableOptions, $data['options']), |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use ACFComposer\ACFComposer; |
4 | 4 | use Flynt\Components; |
5 | 5 | |
6 | -add_action('Flynt/afterRegisterComponents', function () { |
|
6 | +add_action('Flynt/afterRegisterComponents', function() { |
|
7 | 7 | ACFComposer::registerFieldGroup([ |
8 | 8 | 'name' => 'pageComponents', |
9 | 9 | 'title' => 'Page Components', |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use ACFComposer\ACFComposer; |
4 | 4 | use Flynt\Components; |
5 | 5 | |
6 | -add_action('Flynt/afterRegisterComponents', function () { |
|
6 | +add_action('Flynt/afterRegisterComponents', function() { |
|
7 | 7 | ACFComposer::registerFieldGroup([ |
8 | 8 | 'name' => 'postComponents', |
9 | 9 | 'title' => 'Post Components', |