@@ -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('transparentPng', function ($aspect, $r = 0, $g = 0, $b = 0, $a = 127) { |
|
| 66 | +add_action('timber/twig/filters', function($twig) { |
|
| 67 | + $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function($aspect, $r = 0, $g = 0, $b = 0, $a = 127) { |
|
| 68 | 68 | $ratio = aspectToRatio($aspect); |
| 69 | 69 | //create image with specified sizes |
| 70 | 70 | $image = imagecreatetruecolor($ratio['width'], $ratio['height']); |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $k2 = 1; |
| 94 | 94 | $b = 1 / $n; |
| 95 | 95 | do { |
| 96 | - $b = 1/$b; |
|
| 96 | + $b = 1 / $b; |
|
| 97 | 97 | $a = floor($b); |
| 98 | 98 | $aux = $h1; |
| 99 | 99 | $h1 = $a * $h1 + $h2; |
@@ -115,8 +115,8 @@ discard block |
||
| 115 | 115 | return crypt(serialize($args), NONCE_SALT); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | -add_action('timber/twig/filters', function ($twig) { |
|
| 119 | - $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function ($src, $w, $h = 0, $crop = 'default', $force = false) { |
|
| 118 | +add_action('timber/twig/filters', function($twig) { |
|
| 119 | + $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function($src, $w, $h = 0, $crop = 'default', $force = false) { |
|
| 120 | 120 | $arguments = [ |
| 121 | 121 | 'src' => $src, |
| 122 | 122 | 'w' => $w, |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Flynt\Features\Components\Component; |
| 6 | 6 | |
| 7 | -add_filter('Flynt/addComponentData?name=ListTestimonialCards', function ($data) { |
|
| 7 | +add_filter('Flynt/addComponentData?name=ListTestimonialCards', function($data) { |
|
| 8 | 8 | Component::enqueueAssets('ListTestimonialCards'); |
| 9 | 9 | |
| 10 | 10 | return $data; |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Flynt\Features\Components\Component; |
| 6 | 6 | |
| 7 | -add_filter('Flynt/addComponentData?name=ListFacts', function ($data) { |
|
| 7 | +add_filter('Flynt/addComponentData?name=ListFacts', function($data) { |
|
| 8 | 8 | Component::enqueueAssets('ListFacts', [ |
| 9 | 9 | [ |
| 10 | 10 | 'name' => 'countup', |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | // use Flynt\Utils\Asset; |
| 6 | 6 | use Flynt\Features\Components\Component; |
| 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', |