Completed
Push — Features/TinyMce/Improvements ( ad3806...753c49 )
by Doğa
02:31
created
Features/TinyMce/functions.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Flynt\Features\TinyMce;
4 4
 
5
-use Flynt\Utils\Feature;
6 5
 use Flynt\Utils\Asset;
7 6
 
8 7
 // Load TinyMCE Settings from config file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
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'];
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 
22 22
 // Second Toolbar
23 23
 // NOTE: feel free to edit this if needed (see the first toolbar example)
24
-add_filter('mce_buttons_2', function ($buttons) {
24
+add_filter('mce_buttons_2', function($buttons) {
25 25
     return [];
26 26
 });
27 27
 
28
-add_filter('tiny_mce_before_init', function ($init) {
28
+add_filter('tiny_mce_before_init', function($init) {
29 29
     $config = getConfig();
30 30
     if ($config) {
31 31
         if (isset($config['blockformats'])) {
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
     return $init;
41 41
 });
42 42
 
43
-add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) {
43
+add_filter('acf/fields/wysiwyg/toolbars', function($toolbars) {
44 44
     // Load Toolbars and parse them into TinyMCE
45 45
     $config = getConfig();
46 46
     if ($config && !empty($config['toolbars'])) {
47
-        $toolbars = array_map(function ($toolbar) {
47
+        $toolbars = array_map(function($toolbar) {
48 48
             array_unshift($toolbar, []);
49 49
             return $toolbar;
50 50
         }, $config['toolbars']);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 function getBlockFormats($blockFormats)
66 66
 {
67 67
     if (!empty($blockFormats)) {
68
-        $blockFormatStrings = array_map(function ($tag, $label) {
68
+        $blockFormatStrings = array_map(function($tag, $label) {
69 69
             return "${label}=${tag}";
70 70
         }, $blockFormats, array_keys($blockFormats));
71 71
         return implode($blockFormatStrings, ';');
Please login to merge, or discard this patch.