@@ -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') |
@@ -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,13 +5,13 @@ |
||
5 | 5 | use Flynt\Utils\Options; |
6 | 6 | use Timber\Menu; |
7 | 7 | |
8 | -add_action('init', function () { |
|
8 | +add_action('init', function() { |
|
9 | 9 | register_nav_menus([ |
10 | 10 | 'navigation_footer' => __('Navigation Footer', 'flynt') |
11 | 11 | ]); |
12 | 12 | }); |
13 | 13 | |
14 | -add_filter('Flynt/addComponentData?name=NavigationFooter', function ($data) { |
|
14 | +add_filter('Flynt/addComponentData?name=NavigationFooter', function($data) { |
|
15 | 15 | $data['maxLevel'] = 0; |
16 | 16 | $data['menu'] = new Menu('navigation_footer'); |
17 | 17 |
@@ -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', |
@@ -6,7 +6,7 @@ |
||
6 | 6 | use Flynt\FieldVariables; |
7 | 7 | use Timber\Timber; |
8 | 8 | |
9 | -add_action('wp_footer', function () { |
|
9 | +add_action('wp_footer', function() { |
|
10 | 10 | $context = Timber::get_context(); |
11 | 11 | Timber::render_string('{{ renderComponent("BlockCookieNotice") }}', $context); |
12 | 12 | }); |