@@ -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'); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | acf_add_local_field_group($fieldGroup); |
88 | 88 | } |
89 | 89 | |
90 | - add_action('current_screen', function ($currentScreen) { |
|
90 | + add_action('current_screen', function($currentScreen) { |
|
91 | 91 | foreach (static::OPTION_TYPES as $optionType => $option) { |
92 | 92 | $isTranslatable = $option['translatable']; |
93 | 93 | $toplevelPageId = 'toplevel_page_' . $optionType; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | add_filter('acf/settings/current_language', 'Flynt\Utils\Options::getDefaultAcfLanguage', 101); |
102 | 102 | |
103 | 103 | // hide language selector in admin bar |
104 | - add_action('wp_before_admin_bar_render', function () { |
|
104 | + add_action('wp_before_admin_bar_render', function() { |
|
105 | 105 | $adminBar = $GLOBALS['wp_admin_bar']; |
106 | 106 | $adminBar->remove_menu('WPML_ALS'); |
107 | 107 | }); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $optionNames = (((static::$registeredOptions[$optionType] ?? [])[lcfirst($optionCategory)] ?? [])[$subPageName] ?? []); |
152 | 152 | return array_combine( |
153 | 153 | $optionNames, |
154 | - array_map(function ($optionName) use ($prefix, $isTranslatable) { |
|
154 | + array_map(function($optionName) use ($prefix, $isTranslatable) { |
|
155 | 155 | $fieldKey = $prefix . $optionName; |
156 | 156 | return static::getOptionField($fieldKey, $isTranslatable); |
157 | 157 | }, $optionNames) |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | |
236 | 236 | protected static function prefixFields($fields, $prefix) |
237 | 237 | { |
238 | - return array_map(function ($field) use ($prefix) { |
|
238 | + return array_map(function($field) use ($prefix) { |
|
239 | 239 | $field['name'] = $prefix . '_' . $field['name']; |
240 | 240 | return $field; |
241 | 241 | }, $fields); |
@@ -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 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | public static function setTemplateDirectory() |
32 | 32 | { |
33 | - add_action('after_switch_theme', function () { |
|
33 | + add_action('after_switch_theme', function() { |
|
34 | 34 | $stylesheet = get_option('stylesheet'); |
35 | 35 | |
36 | 36 | if (basename($stylesheet) !== 'templates') { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } |
39 | 39 | }); |
40 | 40 | |
41 | - add_filter('stylesheet', function ($stylesheet) { |
|
41 | + add_filter('stylesheet', function($stylesheet) { |
|
42 | 42 | return dirname($stylesheet); |
43 | 43 | }); |
44 | 44 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | if (!$acfActive) { |
55 | - add_filter('template_include', function () { |
|
55 | + add_filter('template_include', function() { |
|
56 | 56 | die( |
57 | 57 | 'One or more required plugins are not activated! Please <a href="' |
58 | 58 | . esc_url(admin_url('plugins.php')) |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | protected static function notifyRequiredPluginIsMissing($pluginName) |
68 | 68 | { |
69 | - add_action('admin_notices', function () use ($pluginName) { |
|
69 | + add_action('admin_notices', function() use ($pluginName) { |
|
70 | 70 | echo "<div class=\"error\"><p>${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\"" |
71 | 71 | . esc_url(admin_url('plugins.php')) . "\">plugin page</a>.</p></div>"; |
72 | 72 | }); |
@@ -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(); |
@@ -42,13 +42,13 @@ |
||
42 | 42 | return ''; |
43 | 43 | } |
44 | 44 | |
45 | - $area = function ($areaName) use ($areaHtml) { |
|
45 | + $area = function($areaName) use ($areaHtml) { |
|
46 | 46 | if (array_key_exists($areaName, $areaHtml)) { |
47 | 47 | return $areaHtml[$areaName]; |
48 | 48 | } |
49 | 49 | }; |
50 | 50 | |
51 | - $data = function () use ($componentData) { |
|
51 | + $data = function() use ($componentData) { |
|
52 | 52 | $args = func_get_args(); |
53 | 53 | array_unshift($args, $componentData); |
54 | 54 | return Helpers::extractNestedDataFromArray($args); |
@@ -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, |
@@ -16,20 +16,20 @@ |
||
16 | 16 | return self::$instance; |
17 | 17 | } |
18 | 18 | |
19 | - /** |
|
20 | - * clone |
|
21 | - * |
|
22 | - * Prevent cloning with 'protected' keyword |
|
23 | - **/ |
|
19 | + /** |
|
20 | + * clone |
|
21 | + * |
|
22 | + * Prevent cloning with 'protected' keyword |
|
23 | + **/ |
|
24 | 24 | protected function __clone() |
25 | 25 | { |
26 | 26 | } |
27 | 27 | |
28 | - /** |
|
29 | - * constructor |
|
30 | - * |
|
31 | - * Prevent instantiation with 'protected' keyword |
|
32 | - **/ |
|
28 | + /** |
|
29 | + * constructor |
|
30 | + * |
|
31 | + * Prevent instantiation with 'protected' keyword |
|
32 | + **/ |
|
33 | 33 | protected function __construct() |
34 | 34 | { |
35 | 35 | } |