@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // Load TinyMCE Settings from config file |
| 9 | 9 | |
| 10 | 10 | // First Toolbar |
| 11 | -add_filter('mce_buttons', function ($buttons) { |
|
| 11 | +add_filter('mce_buttons', function($buttons) { |
|
| 12 | 12 | $config = getConfig(); |
| 13 | 13 | if ($config && isset($config['toolbars'])) { |
| 14 | 14 | $toolbars = $config['toolbars']; |
@@ -20,11 +20,11 @@ discard block |
||
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | 22 | // Second Toolbar |
| 23 | -add_filter('mce_buttons_2', function ($buttons) { |
|
| 23 | +add_filter('mce_buttons_2', function($buttons) { |
|
| 24 | 24 | return []; |
| 25 | 25 | }); |
| 26 | 26 | |
| 27 | -add_filter('tiny_mce_before_init', function ($init) { |
|
| 27 | +add_filter('tiny_mce_before_init', function($init) { |
|
| 28 | 28 | $config = getConfig(); |
| 29 | 29 | if ($config) { |
| 30 | 30 | if (isset($config['blockformats'])) { |
@@ -39,11 +39,11 @@ discard block |
||
| 39 | 39 | return $init; |
| 40 | 40 | }); |
| 41 | 41 | |
| 42 | -add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) { |
|
| 42 | +add_filter('acf/fields/wysiwyg/toolbars', function($toolbars) { |
|
| 43 | 43 | // Load Toolbars and parse them into TinyMCE |
| 44 | 44 | $config = getConfig(); |
| 45 | 45 | if ($config && !empty($config['toolbars'])) { |
| 46 | - $toolbars = array_map(function ($toolbar) { |
|
| 46 | + $toolbars = array_map(function($toolbar) { |
|
| 47 | 47 | array_unshift($toolbar, []); |
| 48 | 48 | return $toolbar; |
| 49 | 49 | }, $config['toolbars']); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | function getBlockFormats($blockFormats) |
| 65 | 65 | { |
| 66 | 66 | if (!empty($blockFormats)) { |
| 67 | - $blockFormatStrings = array_map(function ($tag, $label) { |
|
| 67 | + $blockFormatStrings = array_map(function($tag, $label) { |
|
| 68 | 68 | return "${label}=${tag}"; |
| 69 | 69 | }, $blockFormats, array_keys($blockFormats)); |
| 70 | 70 | return implode($blockFormatStrings, ';'); |