Completed
Pull Request — componentlibrary (#307)
by
unknown
03:17 queued 01:43
created
Components/FeatureTinyMce/functions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 // Load TinyMCE Settings from config file
8 8
 
9 9
 // First Toolbar
10
-add_filter('mce_buttons', function ($buttons) {
10
+add_filter('mce_buttons', function($buttons) {
11 11
     $config = getConfig();
12 12
     if ($config && isset($config['toolbars'])) {
13 13
         $toolbars = $config['toolbars'];
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 });
20 20
 
21 21
 // Second Toolbar
22
-add_filter('mce_buttons_2', function ($buttons) {
22
+add_filter('mce_buttons_2', function($buttons) {
23 23
     return [];
24 24
 });
25 25
 
26
-add_filter('tiny_mce_before_init', function ($init) {
26
+add_filter('tiny_mce_before_init', function($init) {
27 27
     $config = getConfig();
28 28
     if ($config) {
29 29
         if (isset($config['blockformats'])) {
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
     return $init;
39 39
 });
40 40
 
41
-add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) {
41
+add_filter('acf/fields/wysiwyg/toolbars', function($toolbars) {
42 42
     // Load Toolbars and parse them into TinyMCE
43 43
     $config = getConfig();
44 44
     if ($config && !empty($config['toolbars'])) {
45
-        $toolbars = array_map(function ($toolbar) {
45
+        $toolbars = array_map(function($toolbar) {
46 46
             array_unshift($toolbar, []);
47 47
             return $toolbar;
48 48
         }, $config['toolbars']);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 function getBlockFormats($blockFormats)
64 64
 {
65 65
     if (!empty($blockFormats)) {
66
-        $blockFormatStrings = array_map(function ($tag, $label) {
66
+        $blockFormatStrings = array_map(function($tag, $label) {
67 67
             return "${label}=${tag}";
68 68
         }, $blockFormats, array_keys($blockFormats));
69 69
         return implode(';', $blockFormatStrings);
Please login to merge, or discard this patch.