@@ -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 |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | * Add theme options to customizer |
5 | 5 | */ |
6 | 6 | |
7 | -add_action('customize_register', function ($wp_customize) { |
|
7 | +add_action('customize_register', function($wp_customize) { |
|
8 | 8 | // TODO: Optimise this and get default colors. |
9 | 9 | $wp_customize->add_section( |
10 | 10 | 'theme_colors', |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | )); |
125 | 125 | }); |
126 | 126 | |
127 | -add_action('wp_head', function () { |
|
127 | +add_action('wp_head', function() { |
|
128 | 128 | ?> |
129 | 129 | <style type="text/css"> |
130 | 130 | /* TODO: Remove this if there are no colors selected? */ |
@@ -141,13 +141,13 @@ discard block |
||
141 | 141 | .iconList--checkCircle li::before { |
142 | 142 | 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"); |
143 | 143 | } |
144 | - <?php endif;?> |
|
144 | + <?php endif; ?> |
|
145 | 145 | <?php if (get_theme_mod('theme_colors_headline')) : ?> |
146 | 146 | .themeReset select, |
147 | 147 | select { |
148 | 148 | 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"); |
149 | 149 | } |
150 | - <?php endif;?> |
|
150 | + <?php endif; ?> |
|
151 | 151 | </style> |
152 | 152 | <?php |
153 | 153 | }); |