@@ -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 | }); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * clone |
29 | 29 | * |
30 | 30 | * Prevent cloning with 'protected' keyword |
31 | - **/ |
|
31 | + **/ |
|
32 | 32 | protected function __clone() |
33 | 33 | { |
34 | 34 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * constructor |
38 | 38 | * |
39 | 39 | * Prevent instantiation with 'protected' keyword |
40 | - **/ |
|
40 | + **/ |
|
41 | 41 | protected function __construct() |
42 | 42 | { |
43 | 43 | } |
@@ -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 |
@@ -3,6 +3,6 @@ |
||
3 | 3 | namespace Flynt\Features\Templates; |
4 | 4 | |
5 | 5 | // Set Config Path |
6 | -add_filter('Flynt/configPath', function ($filePath, $fileName) { |
|
6 | +add_filter('Flynt/configPath', function($filePath, $fileName) { |
|
7 | 7 | return get_template_directory() . '/config/templates/' . $fileName; |
8 | 8 | }, 10, 2); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | } |
17 | 17 | |
18 | 18 | // collect script dependencies |
19 | - $scriptDeps = array_reduce($dependencies, function ($list, $dependency) { |
|
19 | + $scriptDeps = array_reduce($dependencies, function($list, $dependency) { |
|
20 | 20 | if ($dependency['type'] === 'script') { |
21 | 21 | array_push($list, $dependency['name']); |
22 | 22 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | // collect style dependencies |
38 | - $styleDeps = array_reduce($dependencies, function ($list, $dependency) { |
|
38 | + $styleDeps = array_reduce($dependencies, function($list, $dependency) { |
|
39 | 39 | if ($dependency['type'] === 'style') { |
40 | 40 | array_push($list, $dependency['name']); |
41 | 41 | } |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Flynt\Features\RemoveEditor; |
4 | 4 | |
5 | -add_action('init', function () { |
|
5 | +add_action('init', function() { |
|
6 | 6 | remove_post_type_support('page', 'editor'); |
7 | 7 | remove_post_type_support('post', 'editor'); |
8 | 8 | }); |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Flynt\Features\Navigation; |
4 | 4 | |
5 | -add_action('init', function () { |
|
5 | +add_action('init', function() { |
|
6 | 6 | register_nav_menus([ |
7 | 7 | 'navigation_main' => __('Navigation Main', 'flynt-starter-theme'), |
8 | 8 | 'navigation_footer' => __('Navigation Footer', 'flynt-starter-theme') |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * |
13 | 13 | * Don't return the default description in the RSS feed if it hasn't been changed |
14 | 14 | */ |
15 | -add_filter('get_bloginfo_rss', function ($bloginfo) { |
|
15 | +add_filter('get_bloginfo_rss', function($bloginfo) { |
|
16 | 16 | $defaultTagline = 'Just another WordPress site'; |
17 | 17 | return ($bloginfo === $defaultTagline) ? '' : $bloginfo; |
18 | 18 | }); |
@@ -12,11 +12,11 @@ discard block |
||
12 | 12 | * Remove self-closing tag |
13 | 13 | * |
14 | 14 | */ |
15 | -add_action('init', function () { |
|
15 | +add_action('init', function() { |
|
16 | 16 | // Originally from http://wpengineer.com/1438/wordpress-header/ |
17 | 17 | remove_action('wp_head', 'feed_links_extra', 3); |
18 | 18 | add_action('wp_head', 'ob_start', 1, 0); |
19 | - add_action('wp_head', function () { |
|
19 | + add_action('wp_head', function() { |
|
20 | 20 | $pattern = '/.*' . preg_quote(esc_url(get_feed_link('comments_' . get_default_feed())), '/') . '.*[\r\n]+/'; |
21 | 21 | echo preg_replace($pattern, '', ob_get_clean()); |
22 | 22 | }, 3, 0); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * Clean up output of stylesheet <link> tags |
46 | 46 | */ |
47 | -add_filter('style_loader_tag', function ($input) { |
|
47 | +add_filter('style_loader_tag', function($input) { |
|
48 | 48 | preg_match_all( |
49 | 49 | "!<link rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)' type='text/css' media='(.*)' />!", |
50 | 50 | $input, |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * |
64 | 64 | * Clean up output of <script> tags |
65 | 65 | */ |
66 | -add_filter('script_loader_tag', function ($input) { |
|
66 | +add_filter('script_loader_tag', function($input) { |
|
67 | 67 | $input = str_replace("type='text/javascript' ", '', $input); |
68 | 68 | return str_replace("'", '"', $input); |
69 | 69 | }); |