@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | use Flynt; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=ListTestimonialCards', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=ListTestimonialCards', function($data) { |
|
9 | 9 | Component::enqueueAssets('ListTestimonialCards'); |
10 | 10 | |
11 | 11 | return $data; |
@@ -5,13 +5,13 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
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-starter-theme') |
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 | Component::enqueueAssets('NavigationFooter'); |
16 | 16 | |
17 | 17 | $data['maxLevel'] = 0; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | // Convert ACF Field of type relationship to a Timber\Post and add all ACF Fields of that Post |
24 | 24 | add_filter('acf/format_value/type=relationship', NS . 'formatPostObject', 100); |
25 | -add_filter('get_twig', function ($twig) { |
|
25 | +add_filter('get_twig', function($twig) { |
|
26 | 26 | $twig->addExtension(new TwigExtensionFlynt()); |
27 | 27 | return $twig; |
28 | 28 | }); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | function formatGallery($value) |
39 | 39 | { |
40 | 40 | if (!empty($value)) { |
41 | - $value = array_map(function ($image) { |
|
41 | + $value = array_map(function($image) { |
|
42 | 42 | return new Image($image); |
43 | 43 | }, $value); |
44 | 44 | } |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | return $value; |
64 | 64 | } |
65 | 65 | |
66 | -add_action('timber/twig/filters', function ($twig) { |
|
67 | - $twig->addFunction(new \Twig_SimpleFunction('placeholderImage', function ($width, $height, $color = null) { |
|
66 | +add_action('timber/twig/filters', function($twig) { |
|
67 | + $twig->addFunction(new \Twig_SimpleFunction('placeholderImage', function($width, $height, $color = null) { |
|
68 | 68 | $width = round($width); |
69 | 69 | $height = round($height); |
70 | 70 | $colorRect = $color ? "<rect width='{$width}' height='{$height}' style='fill:$color' />" : ''; |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | return crypt(serialize($args), NONCE_SALT); |
81 | 81 | } |
82 | 82 | |
83 | -add_action('timber/twig/filters', function ($twig) { |
|
84 | - $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function ($src, $w, $h = 0, $crop = 'default', $force = false) { |
|
83 | +add_action('timber/twig/filters', function($twig) { |
|
84 | + $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function($src, $w, $h = 0, $crop = 'default', $force = false) { |
|
85 | 85 | $arguments = [ |
86 | 86 | 'src' => $src, |
87 | 87 | 'w' => $w, |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | use Flynt; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=ListFacts', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=ListFacts', function($data) { |
|
9 | 9 | Component::enqueueAssets('ListFacts', [ |
10 | 10 | [ |
11 | 11 | 'name' => 'countup', |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | use Flynt; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=GridPostsSlider', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=GridPostsSlider', function($data) { |
|
9 | 9 | Component::enqueueAssets('GridPostsSlider', [ |
10 | 10 | [ |
11 | 11 | 'name' => 'slick-carousel', |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | if (is_admin()) { |
39 | 39 | add_action('admin_enqueue_scripts', NS . 'enqueueComponentScripts'); |
40 | 40 | // add image to the flexible content component name |
41 | - add_filter('acf/fields/flexible_content/layout_title', function ($title, $field, $layout, $i) { |
|
41 | + add_filter('acf/fields/flexible_content/layout_title', function($title, $field, $layout, $i) { |
|
42 | 42 | $componentName = ucfirst($layout['name']); |
43 | 43 | $componentPath = "Components/{$componentName}"; |
44 | 44 | $componentPreviewDesktopPath = Asset::requirePath("{$componentPath}/preview-desktop.jpg"); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } else { |
56 | 56 | add_action('wp_enqueue_scripts', NS . 'enqueueComponentScripts'); |
57 | 57 | // adds Component Previews button to admin bar on front-end when logged in |
58 | - add_action('admin_bar_menu', function ($wpAdminBar) { |
|
58 | + add_action('admin_bar_menu', function($wpAdminBar) { |
|
59 | 59 | $title = __('Component Previews', 'flynt-starter-theme'); |
60 | 60 | $wpAdminBar->add_node([ |
61 | 61 | 'id' => 'toggleComponentPreviews', |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Flynt\Features\PasswordForm; |
4 | 4 | |
5 | 5 | use Timber\Timber; |
6 | -use Timber\Post; |
|
7 | 6 | |
8 | 7 | add_filter('the_password_form', function ($output) { |
9 | 8 | $context = Timber::get_context(); |
@@ -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') |
@@ -6,7 +6,7 @@ |
||
6 | 6 | use Flynt\Utils\Options; |
7 | 7 | use Flynt; |
8 | 8 | |
9 | -add_filter('Flynt/addComponentData?name=ListPosts', function ($data) { |
|
9 | +add_filter('Flynt/addComponentData?name=ListPosts', function($data) { |
|
10 | 10 | Component::enqueueAssets('ListPosts'); |
11 | 11 | |
12 | 12 | return $data; |