@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | use Flynt\Utils\Asset; |
10 | 10 | |
11 | -add_action('wp_enqueue_scripts', function () { |
|
11 | +add_action('wp_enqueue_scripts', function() { |
|
12 | 12 | $jqueryVersion = wp_scripts()->registered['jquery']->ver; |
13 | 13 | wp_deregister_script('jquery'); |
14 | 14 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | * |
18 | 18 | * Don't return the default description in the RSS feed if it hasn't been changed |
19 | 19 | */ |
20 | -add_filter('get_bloginfo_rss', function ($bloginfo) { |
|
20 | +add_filter('get_bloginfo_rss', function($bloginfo) { |
|
21 | 21 | $defaultTagline = 'Just another WordPress site'; |
22 | 22 | return ($bloginfo === $defaultTagline) ? '' : $bloginfo; |
23 | 23 | }); |
@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | * Remove self-closing tag |
29 | 29 | * |
30 | 30 | */ |
31 | -add_action('init', function () { |
|
31 | +add_action('init', function() { |
|
32 | 32 | // Originally from http://wpengineer.com/1438/wordpress-header/ |
33 | 33 | remove_action('wp_head', 'feed_links_extra', 3); |
34 | 34 | add_action('wp_head', 'ob_start', 1, 0); |
35 | - add_action('wp_head', function () { |
|
35 | + add_action('wp_head', function() { |
|
36 | 36 | $pattern = '/.*' . preg_quote(esc_url(get_feed_link('comments_' . get_default_feed())), '/') . '.*[\r\n]+/'; |
37 | 37 | echo preg_replace($pattern, '', ob_get_clean()); |
38 | 38 | }, 3, 0); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * |
61 | 61 | * Clean up output of stylesheet <link> tags |
62 | 62 | */ |
63 | -add_filter('style_loader_tag', function ($input) { |
|
63 | +add_filter('style_loader_tag', function($input) { |
|
64 | 64 | preg_match_all( |
65 | 65 | "!<link rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)' type='text/css' media='(.*)' />!", |
66 | 66 | $input, |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | if (count($files) === 0) { |
58 | 58 | $dir = get_template_directory() . '/' . $dir; |
59 | 59 | |
60 | - self::iterateDir($dir, function ($file) { |
|
60 | + self::iterateDir($dir, function($file) { |
|
61 | 61 | if ($file->isDir()) { |
62 | 62 | $dirPath = trim(str_replace(get_template_directory(), '', $file->getPathname()), '/'); |
63 | 63 | self::loadPhpFiles($dirPath); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | }); |
69 | 69 | } else { |
70 | - array_walk($files, function ($file) use ($dir) { |
|
70 | + array_walk($files, function($file) use ($dir) { |
|
71 | 71 | $filePath = $dir . '/' . ltrim($file, '/'); |
72 | 72 | |
73 | 73 | if (!locate_template($filePath, true, true)) { |
@@ -85,7 +85,7 @@ |
||
85 | 85 | . "<p><strong>{$options['title']}</strong></p>" |
86 | 86 | . $msg . '</div>'; |
87 | 87 | |
88 | - add_action('admin_notices', function () use ($msg) { |
|
88 | + add_action('admin_notices', function() use ($msg) { |
|
89 | 89 | echo $msg; |
90 | 90 | }); |
91 | 91 |
@@ -149,10 +149,10 @@ |
||
149 | 149 | } |
150 | 150 | if ($type === 'style') { |
151 | 151 | global $wp_styles; |
152 | - $repo =& $wp_styles; |
|
152 | + $repo = & $wp_styles; |
|
153 | 153 | } else { |
154 | 154 | global $wp_scripts; |
155 | - $repo =& $wp_scripts; |
|
155 | + $repo = & $wp_scripts; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | $asset = $repo->query($handle, 'registered'); |
@@ -34,11 +34,11 @@ |
||
34 | 34 | */ |
35 | 35 | public static function indexedValuesToAssocKeys(array $array) |
36 | 36 | { |
37 | - $values = array_map(function ($value) { |
|
37 | + $values = array_map(function($value) { |
|
38 | 38 | return is_array($value) ? $value : []; |
39 | 39 | }, $array); |
40 | 40 | |
41 | - $keys = array_map(function ($key) use ($array) { |
|
41 | + $keys = array_map(function($key) use ($array) { |
|
42 | 42 | return is_int($key) ? $array[$key] : $key; |
43 | 43 | }, array_keys($array)); |
44 | 44 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | return $output; |
26 | 26 | } |
27 | 27 | |
28 | - // this action needs to be removed by the user if they want to overwrite this functionality |
|
28 | + // this action needs to be removed by the user if they want to overwrite this functionality |
|
29 | 29 | public static function loadFunctionsFile($componentName) |
30 | 30 | { |
31 | 31 | $componentManager = ComponentManager::getInstance(); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | public static function registerHooks() |
74 | 74 | { |
75 | - add_filter('Flynt/renderComponent', function ($output, $componentName, $data) { |
|
75 | + add_filter('Flynt/renderComponent', function($output, $componentName, $data) { |
|
76 | 76 | return apply_filters( |
77 | 77 | "Flynt/renderComponent?name={$componentName}", |
78 | 78 | $output, |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | ); |
82 | 82 | }, 10, 3); |
83 | 83 | |
84 | - add_filter('Flynt/addComponentData', function ($data, $componentName) { |
|
84 | + add_filter('Flynt/addComponentData', function($data, $componentName) { |
|
85 | 85 | return apply_filters( |
86 | 86 | "Flynt/addComponentData?name={$componentName}", |
87 | 87 | $data, |