@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | namespace Flynt\TinyMce; |
| 17 | 17 | |
| 18 | 18 | // First Toolbar |
| 19 | -add_filter('mce_buttons', function ($buttons) { |
|
| 19 | +add_filter('mce_buttons', function($buttons) { |
|
| 20 | 20 | $config = getConfig(); |
| 21 | 21 | if ($config && isset($config['toolbars'])) { |
| 22 | 22 | $toolbars = $config['toolbars']; |
@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | }); |
| 29 | 29 | |
| 30 | 30 | // Second Toolbar |
| 31 | -add_filter('mce_buttons_2', function ($buttons) { |
|
| 31 | +add_filter('mce_buttons_2', function($buttons) { |
|
| 32 | 32 | return []; |
| 33 | 33 | }); |
| 34 | 34 | |
| 35 | -add_filter('tiny_mce_before_init', function ($init) { |
|
| 35 | +add_filter('tiny_mce_before_init', function($init) { |
|
| 36 | 36 | $config = getConfig(); |
| 37 | 37 | if ($config) { |
| 38 | 38 | if (isset($config['blockformats'])) { |
@@ -47,11 +47,11 @@ discard block |
||
| 47 | 47 | return $init; |
| 48 | 48 | }); |
| 49 | 49 | |
| 50 | -add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) { |
|
| 50 | +add_filter('acf/fields/wysiwyg/toolbars', function($toolbars) { |
|
| 51 | 51 | // Load Toolbars and parse them into TinyMCE |
| 52 | 52 | $config = getConfig(); |
| 53 | 53 | if ($config && !empty($config['toolbars'])) { |
| 54 | - $toolbars = array_map(function ($toolbar) { |
|
| 54 | + $toolbars = array_map(function($toolbar) { |
|
| 55 | 55 | array_unshift($toolbar, []); |
| 56 | 56 | return $toolbar; |
| 57 | 57 | }, $config['toolbars']); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | function getBlockFormats($blockFormats) |
| 63 | 63 | { |
| 64 | 64 | if (!empty($blockFormats)) { |
| 65 | - $blockFormatStrings = array_map(function ($tag, $label) { |
|
| 65 | + $blockFormatStrings = array_map(function($tag, $label) { |
|
| 66 | 66 | return "${label}=${tag}"; |
| 67 | 67 | }, $blockFormats, array_keys($blockFormats)); |
| 68 | 68 | return implode(';', $blockFormatStrings); |