@@ -3,7 +3,7 @@ |
||
3 | 3 | use ACFComposer\ACFComposer; |
4 | 4 | use function Flynt\Features\AcfGutenberg\registerGutenbergComponents; |
5 | 5 | |
6 | -add_action('acf/init', function () { |
|
6 | +add_action('acf/init', function() { |
|
7 | 7 | $pageComponents = [ |
8 | 8 | 'Flynt/Components/AccordionDefault/Fields/Layout', |
9 | 9 | 'Flynt/Components/BlockImage/Fields/Layout', |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use ACFComposer\ACFComposer; |
4 | 4 | |
5 | -add_action('acf/init', function () { |
|
5 | +add_action('acf/init', function() { |
|
6 | 6 | $postComponents = [ |
7 | 7 | 'Flynt/Components/BlockImage/Fields/Layout', |
8 | 8 | 'Flynt/Components/BlockWysiwyg/Fields/Layout', |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | return is_null($output) ? '' : $output; |
44 | 44 | } |
45 | 45 | |
46 | -add_filter('Flynt/renderComponent', function ($output, $componentName, $data) { |
|
46 | +add_filter('Flynt/renderComponent', function($output, $componentName, $data) { |
|
47 | 47 | return apply_filters( |
48 | 48 | "Flynt/renderComponent?name={$componentName}", |
49 | 49 | $output, |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ); |
53 | 53 | }, 10, 3); |
54 | 54 | |
55 | -add_filter('Flynt/addComponentData', function ($data, $componentName) { |
|
55 | +add_filter('Flynt/addComponentData', function($data, $componentName) { |
|
56 | 56 | return apply_filters( |
57 | 57 | "Flynt/addComponentData?name={$componentName}", |
58 | 58 | $data, |
@@ -69,11 +69,11 @@ discard block |
||
69 | 69 | foreach ($fields as $key => $fieldData) { |
70 | 70 | $key = ucfirst($key); |
71 | 71 | $keyFilter = "Flynt/{$type}/{$scope}/Fields/{$key}"; |
72 | - add_filter($keyFilter, function () use ($fieldData) { |
|
72 | + add_filter($keyFilter, function() use ($fieldData) { |
|
73 | 73 | return $fieldData; |
74 | 74 | }); |
75 | 75 | if (!empty($fieldData['sub_fields'])) { |
76 | - add_filter($keyFilter . '/SubFields', function () use ($fieldData) { |
|
76 | + add_filter($keyFilter . '/SubFields', function() use ($fieldData) { |
|
77 | 77 | return $fieldData['sub_fields']; |
78 | 78 | }); |
79 | 79 | } |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Flynt\Features\RemoveEditor; |
4 | 4 | |
5 | -add_action('init', function () { |
|
5 | +add_action('init', function() { |
|
6 | 6 | if (!apply_filters('use_block_editor_for_post_type', true, 'post')) { |
7 | 7 | remove_post_type_support('post', 'editor'); |
8 | 8 | } |
@@ -12,11 +12,11 @@ discard block |
||
12 | 12 | * Remove self-closing tag |
13 | 13 | * |
14 | 14 | */ |
15 | -add_action('init', function () { |
|
15 | +add_action('init', function() { |
|
16 | 16 | // Originally from http://wpengineer.com/1438/wordpress-header/ |
17 | 17 | remove_action('wp_head', 'feed_links_extra', 3); |
18 | 18 | add_action('wp_head', 'ob_start', 1, 0); |
19 | - add_action('wp_head', function () { |
|
19 | + add_action('wp_head', function() { |
|
20 | 20 | $pattern = '/.*' . preg_quote(esc_url(get_feed_link('comments_' . get_default_feed())), '/') . '.*[\r\n]+/'; |
21 | 21 | echo preg_replace($pattern, '', ob_get_clean()); |
22 | 22 | }, 3, 0); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * Clean up output of stylesheet <link> tags |
46 | 46 | */ |
47 | -add_filter('style_loader_tag', function ($input) { |
|
47 | +add_filter('style_loader_tag', function($input) { |
|
48 | 48 | preg_match_all( |
49 | 49 | "!<link rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)' type='text/css' media='(.*)' />!", |
50 | 50 | $input, |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * Clean up output of <script> tags |
65 | 65 | */ |
66 | 66 | if (!is_admin()) { |
67 | - add_filter('script_loader_tag', function ($input) { |
|
67 | + add_filter('script_loader_tag', function($input) { |
|
68 | 68 | $input = str_replace("type='text/javascript' ", '', $input); |
69 | 69 | return str_replace("'", '"', $input); |
70 | 70 | }); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | ], |
43 | 43 | ]; |
44 | 44 | |
45 | - add_action('enqueue_block_editor_assets', function () use ($config) { |
|
45 | + add_action('enqueue_block_editor_assets', function() use ($config) { |
|
46 | 46 | $name = ucfirst($config['name']); |
47 | 47 | Asset::enqueue([ |
48 | 48 | 'type' => 'style', |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | function renderBlockCallback($componentName) |
60 | 60 | { |
61 | - return function ($block, $content, $isPreview, $postId) use ($componentName) { |
|
61 | + return function($block, $content, $isPreview, $postId) use ($componentName) { |
|
62 | 62 | $html = Timber::compile_string('{{ renderComponent(name, data)}}', [ |
63 | 63 | 'name' => ucfirst($componentName), |
64 | 64 | 'data' => get_fields(), |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | }; |
68 | 68 | }; |
69 | 69 | |
70 | -add_filter('block_categories', function ($categories, $post) { |
|
70 | +add_filter('block_categories', function($categories, $post) { |
|
71 | 71 | return array_merge( |
72 | 72 | [ |
73 | 73 | [ |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | add_theme_support('align-wide'); |
84 | 84 | add_theme_support('align-full'); |
85 | 85 | |
86 | -add_action('enqueue_block_editor_assets', function () { |
|
86 | +add_action('enqueue_block_editor_assets', function() { |
|
87 | 87 | Asset::enqueue([ |
88 | 88 | 'name' => 'Flynt/assets', |
89 | 89 | 'path' => 'assets/style.css', |