Completed
Push — componentlibrary_featureless ( f542c2...921b57 )
by Dominik
01:42
created
inc/tinyMce.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.