Completed
Push — Features/TinyMce/Improvements ( 89ccee...2ab5e6 )
by
unknown
02:32
created
lib/Utils/Log.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
     public static function consoleDebug($data, $title = 'PHP', $logType = 'log')
18 18
     {
19
-        $title .= '(' . self::getCallerFile(2) .'):';
19
+        $title .= '(' . self::getCallerFile(2) . '):';
20 20
         $type = gettype($data);
21 21
         if (is_array($data) || is_object($data)) {
22 22
             $output = json_encode($data);
Please login to merge, or discard this patch.
lib/Utils/FileLoader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         if (count($files) === 0) {
45 45
             $dir = get_template_directory() . '/' . $dir;
46 46
 
47
-            self::iterateDir($dir, function ($file) {
47
+            self::iterateDir($dir, function($file) {
48 48
                 if ($file->isDir()) {
49 49
                     $dirPath = trim(str_replace(get_template_directory(), '', $file->getPathname()), '/');
50 50
                     self::loadPhpFiles($dirPath);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 }
55 55
             });
56 56
         } else {
57
-            array_walk($files, function ($file) use ($dir) {
57
+            array_walk($files, function($file) use ($dir) {
58 58
                 $filePath = $dir . '/' . ltrim($file, '/');
59 59
 
60 60
                 if (!locate_template($filePath, true, true)) {
Please login to merge, or discard this patch.
lib/Utils/ArrayHelpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,18 +17,18 @@
 block discarded – undo
17 17
     // only converts first dimension of object
18 18
     public static function objectToArray($obj)
19 19
     {
20
-        return array_map(function ($val) {
20
+        return array_map(function($val) {
21 21
             return (array) $val;
22 22
         }, $obj);
23 23
     }
24 24
 
25 25
     public static function indexedValuesToAssocKeys(array $array)
26 26
     {
27
-        $values = array_map(function ($value) {
27
+        $values = array_map(function($value) {
28 28
             return is_array($value) ? $value : [];
29 29
         }, $array);
30 30
 
31
-        $keys = array_map(function ($key) use ($array) {
31
+        $keys = array_map(function($key) use ($array) {
32 32
             return is_int($key) ? $array[$key] : $key;
33 33
         }, array_keys($array));
34 34
 
Please login to merge, or discard this patch.
Features/CustomPostTypes/Translator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         if (is_array($value)) {
52 52
             // Loop through array and apply translations while keeping keys intact
53 53
             // NOTE: assuming it's a single dimensional array
54
-            return array_reduce(array_keys($value), function ($carry, $key) use ($value) {
54
+            return array_reduce(array_keys($value), function($carry, $key) use ($value) {
55 55
                 return array_merge($carry, [
56 56
                     $key => _x($value[$key], $key, 'flynt-starter-theme')
57 57
                 ]);
Please login to merge, or discard this patch.
Features/TinyMce/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  discard block
 block discarded – undo
7 7
 // Clean Up TinyMCE Buttons
8 8
 
9 9
 // First Bar
10
-add_filter('mce_buttons', function ($buttons) {
10
+add_filter('mce_buttons', function($buttons) {
11 11
     $toolbarsFromFile = getToolbarsFromJson();
12 12
     return $toolbarsFromFile['Default'];
13 13
 });
14 14
 
15 15
 // Second Bar
16
-add_filter('mce_buttons_2', function ($buttons) {
16
+add_filter('mce_buttons_2', function($buttons) {
17 17
     return [];
18 18
 });
19 19
 
20
-add_filter('tiny_mce_before_init', function ($init) {
20
+add_filter('tiny_mce_before_init', function($init) {
21 21
     // Add block format elements you want to show in dropdown
22 22
     $init['block_formats'] = 'Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6';
23 23
     
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     return $init;
38 38
 });
39 39
 
40
-add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) {
40
+add_filter('acf/fields/wysiwyg/toolbars', function($toolbars) {
41 41
     // Load Toolbars and parse them into TinyMCE
42 42
     $toolbarsFromFile = getToolbarsFromJson();
43 43
     if ($toolbarsFromFile) {
Please login to merge, or discard this patch.