@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | namespace Flynt\RemoveEditor; |
| 8 | 8 | |
| 9 | -add_action('init', function () { |
|
| 9 | +add_action('init', function() { |
|
| 10 | 10 | remove_post_type_support('page', 'editor'); |
| 11 | 11 | remove_post_type_support('post', 'editor'); |
| 12 | 12 | }); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Removes Gutenberg default styles on front-end |
| 16 | 16 | */ |
| 17 | -add_action('wp_print_styles', function () { |
|
| 17 | +add_action('wp_print_styles', function() { |
|
| 18 | 18 | wp_dequeue_style('wp-block-library'); |
| 19 | 19 | wp_dequeue_style('wp-block-library-theme'); |
| 20 | 20 | }); |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | use Flynt\Utils\TimberDynamicResize; |
| 7 | 7 | use acf_field_message; |
| 8 | 8 | |
| 9 | -add_action('acf/init', function () { |
|
| 9 | +add_action('acf/init', function() { |
|
| 10 | 10 | global $timberDynamicResize; |
| 11 | 11 | $timberDynamicResize = new TimberDynamicResize(); |
| 12 | 12 | }); |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | add_filter( |
| 49 | 49 | 'acf/load_field/key=field_global_TimberDynamicResize_relativeUploadPath', |
| 50 | - function ($field) { |
|
| 50 | + function($field) { |
|
| 51 | 51 | $field['placeholder'] = TimberDynamicResize::getDefaultRelativeUploadDir(); |
| 52 | 52 | return $field; |
| 53 | 53 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | add_filter( |
| 57 | 57 | 'acf/load_field/key=field_global_TimberDynamicResize_webpSupport', |
| 58 | - function ($field) { |
|
| 58 | + function($field) { |
|
| 59 | 59 | if (!function_exists('imagewebp')) { |
| 60 | 60 | $messageField = new acf_field_message(); |
| 61 | 61 | $field = array_merge($messageField->defaults, $field); |
@@ -68,14 +68,14 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | add_filter( |
| 70 | 70 | 'acf/load_value/key=field_global_TimberDynamicResize_webpSupport', |
| 71 | - function ($value) { |
|
| 71 | + function($value) { |
|
| 72 | 72 | return function_exists('imagewebp') ? $value : '0'; |
| 73 | 73 | } |
| 74 | 74 | ); |
| 75 | 75 | |
| 76 | 76 | add_action( |
| 77 | 77 | 'update_option_options_global_TimberDynamicResize_dynamicImageGeneration', |
| 78 | - function ($oldValue, $value) { |
|
| 78 | + function($oldValue, $value) { |
|
| 79 | 79 | global $timberDynamicResize; |
| 80 | 80 | $timberDynamicResize->toggleDynamic($value === '1'); |
| 81 | 81 | }, |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | add_action( |
| 87 | 87 | 'update_option_options_global_TimberDynamicResize_webpSupport', |
| 88 | - function ($oldValue, $value) { |
|
| 88 | + function($oldValue, $value) { |
|
| 89 | 89 | global $timberDynamicResize; |
| 90 | 90 | $timberDynamicResize->toggleWebp($value === '1'); |
| 91 | 91 | }, |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | add_action( |
| 97 | 97 | 'update_option_options_global_TimberDynamicResize_relativeUploadPath', |
| 98 | - function ($oldValue, $value) { |
|
| 98 | + function($oldValue, $value) { |
|
| 99 | 99 | global $timberDynamicResize; |
| 100 | 100 | $timberDynamicResize->changeRelativeUploadPath($value); |
| 101 | 101 | }, |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | ); |
| 105 | 105 | |
| 106 | 106 | # WPML REWRITE FIX |
| 107 | -add_filter('mod_rewrite_rules', function ($rules) { |
|
| 107 | +add_filter('mod_rewrite_rules', function($rules) { |
|
| 108 | 108 | $homeRoot = parse_url(home_url()); |
| 109 | 109 | if (isset($homeRoot['path'])) { |
| 110 | 110 | $homeRoot = trailingslashit($homeRoot['path']); |
@@ -6,13 +6,13 @@ |
||
| 6 | 6 | use Timber\Menu; |
| 7 | 7 | use Flynt\Shortcodes; |
| 8 | 8 | |
| 9 | -add_action('init', function () { |
|
| 9 | +add_action('init', function() { |
|
| 10 | 10 | register_nav_menus([ |
| 11 | 11 | 'navigation_footer' => __('Navigation Footer', 'flynt') |
| 12 | 12 | ]); |
| 13 | 13 | }); |
| 14 | 14 | |
| 15 | -add_filter('Flynt/addComponentData?name=NavigationFooter', function ($data) { |
|
| 15 | +add_filter('Flynt/addComponentData?name=NavigationFooter', function($data) { |
|
| 16 | 16 | $data['maxLevel'] = 0; |
| 17 | 17 | $data['menu'] = new Menu('navigation_footer'); |
| 18 | 18 | |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | /** |
| 10 | 10 | * Current year |
| 11 | 11 | */ |
| 12 | -add_shortcode('year', function () { |
|
| 12 | +add_shortcode('year', function() { |
|
| 13 | 13 | $year = date_i18n('Y'); |
| 14 | 14 | return $year; |
| 15 | 15 | }); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * Site Title |
| 19 | 19 | */ |
| 20 | -add_shortcode('sitetitle', function () { |
|
| 20 | +add_shortcode('sitetitle', function() { |
|
| 21 | 21 | $blogname = get_bloginfo('name'); |
| 22 | 22 | return $blogname; |
| 23 | 23 | }); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | /** |
| 26 | 26 | * Tagline |
| 27 | 27 | */ |
| 28 | -add_shortcode('tagline', function () { |
|
| 28 | +add_shortcode('tagline', function() { |
|
| 29 | 29 | $tagline = get_bloginfo('description'); |
| 30 | 30 | return $tagline; |
| 31 | 31 | }); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | use WP_Customize_Image_Control; |
| 10 | 10 | |
| 11 | -add_action('customize_register', function ($wp_customize) { |
|
| 11 | +add_action('customize_register', function($wp_customize) { |
|
| 12 | 12 | // Add option to replace header logo |
| 13 | 13 | $wp_customize->add_setting( |
| 14 | 14 | 'custom_header_logo', |
@@ -143,10 +143,10 @@ discard block |
||
| 143 | 143 | return $themes; |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | -add_action('acf/init', function () { |
|
| 146 | +add_action('acf/init', function() { |
|
| 147 | 147 | $options = Options::getGlobal('CustomizerColors'); |
| 148 | 148 | if ($options['enabled']) { |
| 149 | - add_action('customize_register', function ($wp_customize) { |
|
| 149 | + add_action('customize_register', function($wp_customize) { |
|
| 150 | 150 | $themes = getThemesConfig(); |
| 151 | 151 | |
| 152 | 152 | $wp_customize->add_panel( |
@@ -193,14 +193,14 @@ discard block |
||
| 193 | 193 | } |
| 194 | 194 | }); |
| 195 | 195 | |
| 196 | - add_action('customize_preview_init', function () { |
|
| 196 | + add_action('customize_preview_init', function() { |
|
| 197 | 197 | wp_enqueue_script( |
| 198 | 198 | 'customizer-colors', |
| 199 | 199 | Asset::requireUrl('assets/customizer-colors.js'), |
| 200 | - ['jquery','customize-preview'], |
|
| 200 | + ['jquery', 'customize-preview'], |
|
| 201 | 201 | ); |
| 202 | 202 | $themes = getThemesConfig(); |
| 203 | - $config = array_map(function ($theme) { |
|
| 203 | + $config = array_map(function($theme) { |
|
| 204 | 204 | return $theme['colors']; |
| 205 | 205 | }, $themes); |
| 206 | 206 | wp_localize_script('customizer-colors', 'FlyntCustomizerColorsData', $config); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | } |
| 209 | 209 | }); |
| 210 | 210 | |
| 211 | -add_action('wp_head', function () { |
|
| 211 | +add_action('wp_head', function() { |
|
| 212 | 212 | $themes = getThemesConfig(); |
| 213 | 213 | ?> |
| 214 | 214 | <style type="text/css"> |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $b = hexdec(substr($color, 4, 2)); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - $rgba = [ $r, $g, $b, $opacity ]; |
|
| 32 | + $rgba = [$r, $g, $b, $opacity]; |
|
| 33 | 33 | |
| 34 | 34 | if ($returnType === 'string') { |
| 35 | 35 | return 'rgba(' . implode(',', $rgba) . ')'; |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $s = round($s * 100, 1); |
| 86 | 86 | $l = round($l * 100, 1); |
| 87 | 87 | |
| 88 | - $hsla = [ $h, "$s%", "$l%", $opacity ]; |
|
| 88 | + $hsla = [$h, "$s%", "$l%", $opacity]; |
|
| 89 | 89 | |
| 90 | 90 | if ($returnType === 'string') { |
| 91 | 91 | return 'hsla(' . implode(',', $hsla) . ')'; |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Flynt\Utils\Options; |
| 6 | 6 | |
| 7 | -add_filter('Flynt/addComponentData?name=BlockPostFooter', function ($data) { |
|
| 7 | +add_filter('Flynt/addComponentData?name=BlockPostFooter', function($data) { |
|
| 8 | 8 | |
| 9 | 9 | return $data; |
| 10 | 10 | }); |