@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | public static function setTemplateDirectory() |
| 41 | 41 | { |
| 42 | - add_action('after_switch_theme', function () { |
|
| 42 | + add_action('after_switch_theme', function() { |
|
| 43 | 43 | $stylesheet = get_option('stylesheet'); |
| 44 | 44 | |
| 45 | 45 | if (basename($stylesheet) !== 'templates') { |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | }); |
| 49 | 49 | |
| 50 | - add_filter('stylesheet', function ($stylesheet) { |
|
| 50 | + add_filter('stylesheet', function($stylesheet) { |
|
| 51 | 51 | return dirname($stylesheet); |
| 52 | 52 | }); |
| 53 | 53 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | if (!$acfActive) { |
| 64 | - add_filter('template_include', function () { |
|
| 64 | + add_filter('template_include', function() { |
|
| 65 | 65 | die( |
| 66 | 66 | 'One or more required plugins are not activated! Please <a href="' |
| 67 | 67 | . esc_url(admin_url('plugins.php')) |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | protected static function notifyRequiredPluginIsMissing($pluginName) |
| 77 | 77 | { |
| 78 | - add_action('admin_notices', function () use ($pluginName) { |
|
| 78 | + add_action('admin_notices', function() use ($pluginName) { |
|
| 79 | 79 | echo "<div class=\"error\"><p>${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\"" |
| 80 | 80 | . esc_url(admin_url('plugins.php')) . "\">plugin page</a>.</p></div>"; |
| 81 | 81 | }); |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Flynt\Api; |
| 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 | [ |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | use Flynt\Api; |
| 5 | 5 | use Timber\Timber; |
| 6 | 6 | |
| 7 | -add_filter('Flynt/addComponentData?name=ListPostCards', function ($data) { |
|
| 7 | +add_filter('Flynt/addComponentData?name=ListPostCards', function($data) { |
|
| 8 | 8 | $posts = Timber::get_posts([ |
| 9 | 9 | 'post_type' => 'post', |
| 10 | 10 | 'posts_per_page' => 4, |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Flynt\Api; |
| 6 | 6 | use Timber\Timber; |
| 7 | 7 | |
| 8 | -add_filter('Flynt/addComponentData?name=GridPostsSlider', function ($data) { |
|
| 8 | +add_filter('Flynt/addComponentData?name=GridPostsSlider', function($data) { |
|
| 9 | 9 | $posts = Timber::get_posts([ |
| 10 | 10 | 'post_type' => 'post', |
| 11 | 11 | 'posts_per_page' => -1, |
@@ -5,9 +5,9 @@ |
||
| 5 | 5 | use Flynt\Api; |
| 6 | 6 | use Flynt\Utils\Asset; |
| 7 | 7 | |
| 8 | -add_filter('Flynt/addComponentData?name=ListSocial', function ($data) { |
|
| 8 | +add_filter('Flynt/addComponentData?name=ListSocial', function($data) { |
|
| 9 | 9 | if (!empty($data['social'])) { |
| 10 | - $data['social'] = array_map(function ($item) { |
|
| 10 | + $data['social'] = array_map(function($item) { |
|
| 11 | 11 | $item['icon'] = Asset::getContents("Components/ListSocial/Assets/{$item['platform']}.svg"); |
| 12 | 12 | return $item; |
| 13 | 13 | }, $data['social']); |
@@ -4,9 +4,9 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Flynt\Api; |
| 6 | 6 | |
| 7 | -add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function ($data) { |
|
| 7 | +add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function($data) { |
|
| 8 | 8 | if (!empty($data['items'])) { |
| 9 | - $data['items'] = array_map(function ($item) { |
|
| 9 | + $data['items'] = array_map(function($item) { |
|
| 10 | 10 | if ($item['itemType'] === 'itemFile') { |
| 11 | 11 | $fileSize = filesize(get_attached_file($item['file']['id'])); |
| 12 | 12 | $item['file']['fileSize'] = size_format($fileSize); |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Flynt\Utils\Asset; |
| 6 | 6 | |
| 7 | -add_action('wp_enqueue_scripts', function () { |
|
| 7 | +add_action('wp_enqueue_scripts', function() { |
|
| 8 | 8 | $jqueryVersion = wp_scripts()->registered['jquery']->ver; |
| 9 | 9 | wp_deregister_script('jquery'); |
| 10 | 10 | |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Flynt\Utils\Asset; |
| 4 | 4 | |
| 5 | -add_action('wp_enqueue_scripts', function () { |
|
| 5 | +add_action('wp_enqueue_scripts', function() { |
|
| 6 | 6 | Asset::enqueue([ |
| 7 | 7 | 'name' => 'Flynt/assets/vendor', |
| 8 | 8 | 'type' => 'script', |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | ]); |
| 32 | 32 | }); |
| 33 | 33 | |
| 34 | -add_action('admin_enqueue_scripts', function () { |
|
| 34 | +add_action('admin_enqueue_scripts', function() { |
|
| 35 | 35 | Asset::enqueue([ |
| 36 | 36 | 'name' => 'Flynt/assets/vendorAdmin', |
| 37 | 37 | 'type' => 'script', |