@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | // Convert ACF Field of type relationship to a Timber\Post and add all ACF Fields of that Post |
31 | 31 | add_filter('acf/format_value/type=relationship', NS . 'formatPostObject', 100); |
32 | -add_filter('get_twig', function ($twig) { |
|
32 | +add_filter('get_twig', function($twig) { |
|
33 | 33 | $twig->addExtension(new TwigExtensionFlynt()); |
34 | 34 | return $twig; |
35 | 35 | }); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | function formatGallery($value) |
46 | 46 | { |
47 | 47 | if (!empty($value)) { |
48 | - $value = array_map(function ($image) { |
|
48 | + $value = array_map(function($image) { |
|
49 | 49 | return new Image($image); |
50 | 50 | }, $value); |
51 | 51 | } |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | return $value; |
71 | 71 | } |
72 | 72 | |
73 | -add_action('timber/twig/filters', function ($twig) { |
|
74 | - $twig->addFunction(new TwigFunction('placeholderImage', function ($width, $height, $color = null) { |
|
73 | +add_action('timber/twig/filters', function($twig) { |
|
74 | + $twig->addFunction(new TwigFunction('placeholderImage', function($width, $height, $color = null) { |
|
75 | 75 | $width = round($width); |
76 | 76 | $height = round($height); |
77 | 77 | $colorRect = $color ? "<rect width='{$width}' height='{$height}' style='fill:$color' />" : ''; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | return "data:image/svg+xml;base64," . base64_encode($svg); |
80 | 80 | })); |
81 | 81 | |
82 | - $twig->addFunction(new TwigFunction('requireUrl', function ($asset) { |
|
82 | + $twig->addFunction(new TwigFunction('requireUrl', function($asset) { |
|
83 | 83 | return Asset::requireUrl($asset); |
84 | 84 | })); |
85 | 85 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | use Flynt\Utils\Asset; |
8 | 8 | |
9 | -add_action('customize_register', function ($wp_customize) { |
|
9 | +add_action('customize_register', function($wp_customize) { |
|
10 | 10 | // TODO: Optimise this and get default colors. |
11 | 11 | $wp_customize->add_section( |
12 | 12 | 'theme_colors', |
@@ -132,17 +132,17 @@ discard block |
||
132 | 132 | )); |
133 | 133 | }); |
134 | 134 | |
135 | -add_action('customize_preview_init', function () { |
|
135 | +add_action('customize_preview_init', function() { |
|
136 | 136 | wp_enqueue_script( |
137 | 137 | 'customizer-colors', |
138 | 138 | Asset::requireUrl('assets/customizer-colors.js'), |
139 | - array('jquery','customize-preview'), |
|
139 | + array('jquery', 'customize-preview'), |
|
140 | 140 | '', |
141 | 141 | true |
142 | 142 | ); |
143 | 143 | }); |
144 | 144 | |
145 | -add_action('wp_head', function () { |
|
145 | +add_action('wp_head', function() { |
|
146 | 146 | ?> |
147 | 147 | <style type="text/css"> |
148 | 148 | /* TODO: Remove this if there are no colors selected? */ |
@@ -159,13 +159,13 @@ discard block |
||
159 | 159 | .iconList--checkCircle li::before { |
160 | 160 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23<?php echo substr(get_theme_mod('theme_colors_accent'), 1); ?>' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-check-circle'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpath d='M22 4L12 14.01l-3-3'/%3E%3C/svg%3E%0A"); |
161 | 161 | } |
162 | - <?php endif;?> |
|
162 | + <?php endif; ?> |
|
163 | 163 | <?php if (get_theme_mod('theme_colors_headline')) : ?> |
164 | 164 | .themeReset select, |
165 | 165 | select { |
166 | 166 | background-image: url("data:image/svg+xml;charset=utf8,%3Csvg width='32' height='32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline fill='none' stroke='%23<?php echo substr(get_theme_mod('theme_colors_headline'), 1); ?>' stroke-width='5' points='2,9 16,25 30,9 '/%3E%3C/svg%3E"); |
167 | 167 | } |
168 | - <?php endif;?> |
|
168 | + <?php endif; ?> |
|
169 | 169 | </style> |
170 | 170 | <?php |
171 | 171 | }); |