| @@ -8,7 +8,7 @@ | ||
| 8 | 8 | use Flynt\Utils\Feature; | 
| 9 | 9 | use Flynt\Features\CustomTaxonomies\CustomTaxonomyRegister; | 
| 10 | 10 | |
| 11 | -add_action('init', function () { | |
| 11 | +add_action('init', function() { | |
| 12 | 12 |      $featureOptions = Feature::getOption('flynt-custom-taxonomies', 0); | 
| 13 | 13 | $dir = isset($featureOptions['dir']) ? $featureOptions['dir'] : null; | 
| 14 | 14 | $fileName = isset($featureOptions['fileName']) ? $featureOptions['fileName'] : null; | 
| @@ -51,7 +51,7 @@ | ||
| 51 | 51 |          if (is_array($value)) { | 
| 52 | 52 | // Loop through array and apply translations while keeping keys intact | 
| 53 | 53 | // NOTE: assuming it's a single dimensional array | 
| 54 | -            return array_reduce(array_keys($value), function ($carry, $key) use ($value) { | |
| 54 | +            return array_reduce(array_keys($value), function($carry, $key) use ($value) { | |
| 55 | 55 | return array_merge($carry, [ | 
| 56 | 56 | $key => _x($value[$key], $key, 'flynt-starter-theme') | 
| 57 | 57 | ]); | 
| @@ -58,7 +58,7 @@ discard block | ||
| 58 | 58 | |
| 59 | 59 | protected static function cleanConfig($config) | 
| 60 | 60 |      { | 
| 61 | -        $cleanConfig = array_map(function ($value) { | |
| 61 | +        $cleanConfig = array_map(function($value) { | |
| 62 | 62 |              if (is_array($value)) { | 
| 63 | 63 | return self::cleanConfig($value); | 
| 64 | 64 | } | 
| @@ -67,14 +67,14 @@ discard block | ||
| 67 | 67 | }, $config); | 
| 68 | 68 | |
| 69 | 69 | // remove null values or empty arrays | 
| 70 | -        return array_filter($cleanConfig, function ($value) { | |
| 70 | +        return array_filter($cleanConfig, function($value) { | |
| 71 | 71 | return !(is_null($value) || (is_array($value) && empty($value))); | 
| 72 | 72 | }); | 
| 73 | 73 | } | 
| 74 | 74 | |
| 75 | 75 | protected static function getConfigs($dir) | 
| 76 | 76 |      { | 
| 77 | -        $configs = FileLoader::iterateDir($dir, function ($file) { | |
| 77 | +        $configs = FileLoader::iterateDir($dir, function($file) { | |
| 78 | 78 |              if ($file->isFile() && $file->getExtension() == 'json') { | 
| 79 | 79 | $configPath = $file->getPathname(); | 
| 80 | 80 |                  $name = StringHelpers::camelCaseToKebap($file->getBasename('.json')); | 
| @@ -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 | $post = new Post(); | 
| 11 | 11 | $context['form'] = [ | 
| @@ -26,7 +26,7 @@ | ||
| 26 | 26 | self::setupHelpers(); | 
| 27 | 27 | |
| 28 | 28 | // add styles for admin area | 
| 29 | -            add_action('admin_enqueue_scripts', function () { | |
| 29 | +            add_action('admin_enqueue_scripts', function() { | |
| 30 | 30 | Asset::enqueue([ | 
| 31 | 31 | 'type' => 'style', | 
| 32 | 32 | 'name' => 'Flynt/Features/Acf/AdminCss', | 
| @@ -14,7 +14,7 @@ | ||
| 14 | 14 |      { | 
| 15 | 15 |          if (is_admin()) { | 
| 16 | 16 | // adds buttons to collapse/expand components | 
| 17 | -            add_filter('acf/get_field_label', function ($label, $field) { | |
| 17 | +            add_filter('acf/get_field_label', function($label, $field) { | |
| 18 | 18 |                  if ($field['type'] === 'flexible_content') { | 
| 19 | 19 | $label .= '<span class="flexible-content-controls">'; | 
| 20 | 20 | $label .= '<a class="acf-icon small -collapse collapse-all" title="collapse all"></a>'; | 
| @@ -51,7 +51,7 @@ discard block | ||
| 51 | 51 | |
| 52 | 52 | protected static function cleanConfig($config) | 
| 53 | 53 |      { | 
| 54 | -        $cleanConfig = array_map(function ($value) { | |
| 54 | +        $cleanConfig = array_map(function($value) { | |
| 55 | 55 |              if (is_array($value)) { | 
| 56 | 56 | return self::cleanConfig($value); | 
| 57 | 57 | } | 
| @@ -60,14 +60,14 @@ discard block | ||
| 60 | 60 | }, $config); | 
| 61 | 61 | |
| 62 | 62 | // remove null values or empty arrays | 
| 63 | -        return array_filter($cleanConfig, function ($value) { | |
| 63 | +        return array_filter($cleanConfig, function($value) { | |
| 64 | 64 | return !(is_null($value) || (is_array($value) && empty($value))); | 
| 65 | 65 | }); | 
| 66 | 66 | } | 
| 67 | 67 | |
| 68 | 68 | protected static function getConfigs($dir) | 
| 69 | 69 |      { | 
| 70 | -        $configs = FileLoader::iterateDir($dir, function ($file) { | |
| 70 | +        $configs = FileLoader::iterateDir($dir, function($file) { | |
| 71 | 71 |              if ($file->isDir()) { | 
| 72 | 72 | $configPath = $file->getPathname() . '/' . self::$fileName; | 
| 73 | 73 | |
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace Flynt\Features\MimeTypes; | 
| 4 | 4 | |
| 5 | -add_filter('upload_mimes', function ($mimes) { | |
| 5 | +add_filter('upload_mimes', function($mimes) { | |
| 6 | 6 | $mimes['svg'] = 'image/svg+xml'; | 
| 7 | 7 | return $mimes; | 
| 8 | 8 | }); | 
| @@ -68,7 +68,7 @@ | ||
| 68 | 68 |          . "<p><strong>{$options['title']}</strong></p>" | 
| 69 | 69 | . $msg . '</div>'; | 
| 70 | 70 | |
| 71 | -        add_action('admin_notices', function () use ($msg) { | |
| 71 | +        add_action('admin_notices', function() use ($msg) { | |
| 72 | 72 | echo $msg; | 
| 73 | 73 | }); | 
| 74 | 74 | |