@@ -68,7 +68,7 @@ |
||
68 | 68 | . "<p><strong>{$options['title']}</strong></p>" |
69 | 69 | . $msg . '</div>'; |
70 | 70 | |
71 | - add_action('admin_notices', function () use ($msg) { |
|
71 | + add_action('admin_notices', function() use ($msg) { |
|
72 | 72 | echo $msg; |
73 | 73 | }); |
74 | 74 |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | |
4 | 4 | use Flynt\Utils\Asset; |
5 | 5 | |
6 | -add_action('admin_enqueue_scripts', function () { |
|
6 | +add_action('admin_enqueue_scripts', function() { |
|
7 | 7 | $data = [ |
8 | 8 | 'templateDirectoryUri' => get_template_directory_uri() . '/dist', |
9 | 9 | ]; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | if (class_exists('acf')) { |
14 | 14 | if (is_admin()) { |
15 | 15 | // add image to the flexible content component name |
16 | - add_filter('acf/fields/flexible_content/layout_title', function ($title, $field, $layout, $i) { |
|
16 | + add_filter('acf/fields/flexible_content/layout_title', function($title, $field, $layout, $i) { |
|
17 | 17 | $componentName = ucfirst($layout['name']); |
18 | 18 | $componentPath = "Components/{$componentName}"; |
19 | 19 | $componentScreenshotPath = Asset::requirePath("{$componentPath}/screenshot.png"); |
@@ -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') |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | namespace Flynt\TinyMce; |
17 | 17 | |
18 | 18 | // First Toolbar |
19 | -add_filter('mce_buttons', function ($buttons) { |
|
19 | +add_filter('mce_buttons', function($buttons) { |
|
20 | 20 | $config = getConfig(); |
21 | 21 | if ($config && isset($config['toolbars'])) { |
22 | 22 | $toolbars = $config['toolbars']; |
@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | }); |
29 | 29 | |
30 | 30 | // Second Toolbar |
31 | -add_filter('mce_buttons_2', function ($buttons) { |
|
31 | +add_filter('mce_buttons_2', function($buttons) { |
|
32 | 32 | return []; |
33 | 33 | }); |
34 | 34 | |
35 | -add_filter('tiny_mce_before_init', function ($init) { |
|
35 | +add_filter('tiny_mce_before_init', function($init) { |
|
36 | 36 | $config = getConfig(); |
37 | 37 | if ($config) { |
38 | 38 | if (isset($config['blockformats'])) { |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | return $init; |
48 | 48 | }); |
49 | 49 | |
50 | -add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) { |
|
50 | +add_filter('acf/fields/wysiwyg/toolbars', function($toolbars) { |
|
51 | 51 | // Load Toolbars and parse them into TinyMCE |
52 | 52 | $config = getConfig(); |
53 | 53 | if ($config && !empty($config['toolbars'])) { |
54 | - $toolbars = array_map(function ($toolbar) { |
|
54 | + $toolbars = array_map(function($toolbar) { |
|
55 | 55 | array_unshift($toolbar, []); |
56 | 56 | return $toolbar; |
57 | 57 | }, $config['toolbars']); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | function getBlockFormats($blockFormats) |
63 | 63 | { |
64 | 64 | if (!empty($blockFormats)) { |
65 | - $blockFormatStrings = array_map(function ($tag, $label) { |
|
65 | + $blockFormatStrings = array_map(function($tag, $label) { |
|
66 | 66 | return "${label}=${tag}"; |
67 | 67 | }, $blockFormats, array_keys($blockFormats)); |
68 | 68 | return implode(';', $blockFormatStrings); |
@@ -5,13 +5,13 @@ |
||
5 | 5 | use Timber\Menu; |
6 | 6 | use Flynt\Utils\Asset; |
7 | 7 | |
8 | -add_action('init', function () { |
|
8 | +add_action('init', function() { |
|
9 | 9 | register_nav_menus([ |
10 | 10 | 'navigation_main' => __('Navigation Main', 'flynt') |
11 | 11 | ]); |
12 | 12 | }); |
13 | 13 | |
14 | -add_filter('Flynt/addComponentData?name=NavigationMain', function ($data) { |
|
14 | +add_filter('Flynt/addComponentData?name=NavigationMain', function($data) { |
|
15 | 15 | $data['maxLevel'] = 0; |
16 | 16 | $data['menu'] = new Menu('navigation_main'); |
17 | 17 |
@@ -4,13 +4,13 @@ |
||
4 | 4 | |
5 | 5 | use Timber\Menu; |
6 | 6 | |
7 | -add_action('init', function () { |
|
7 | +add_action('init', function() { |
|
8 | 8 | register_nav_menus([ |
9 | 9 | 'navigation_footer' => __('Navigation Footer', 'flynt') |
10 | 10 | ]); |
11 | 11 | }); |
12 | 12 | |
13 | -add_filter('Flynt/addComponentData?name=NavigationFooter', function ($data) { |
|
13 | +add_filter('Flynt/addComponentData?name=NavigationFooter', function($data) { |
|
14 | 14 | $data['maxLevel'] = 0; |
15 | 15 | $data['menu'] = new Menu('navigation_footer'); |
16 | 16 |