Completed
Push — Features/TinyMce/Improvements ( 6eca63...ad3806 )
by Doğa
02:46
created
Components/SliderMedia/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
 use Flynt\Features\Components\Component;
6 6
 use Flynt\Utils\Oembed;
7 7
 
8
-add_filter('Flynt/addComponentData?name=SliderMedia', function ($data) {
9
-    $data['mediaSlides'] = array_map(function ($item) {
8
+add_filter('Flynt/addComponentData?name=SliderMedia', function($data) {
9
+    $data['mediaSlides'] = array_map(function($item) {
10 10
         if ($item['mediaType'] == 'oembed') {
11 11
             $item['oembedLazyLoad'] = Oembed::setSrcAsDataAttribute(
12 12
                 $item['oembed'],
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     return $data;
22 22
 });
23 23
 
24
-add_action('wp_enqueue_scripts', function () {
24
+add_action('wp_enqueue_scripts', function() {
25 25
     Component::enqueueAssets('SliderMedia', [
26 26
         [
27 27
             'name' => 'slick-carousel',
Please login to merge, or discard this patch.
Components/BlockVideoOembed/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,11 +5,11 @@
 block discarded – undo
5 5
 use Flynt\Features\Components\Component;
6 6
 use Flynt\Utils\Oembed;
7 7
 
8
-add_action('wp_enqueue_scripts', function () {
8
+add_action('wp_enqueue_scripts', function() {
9 9
     Component::enqueueAssets('BlockVideoOembed');
10 10
 });
11 11
 
12
-add_filter('Flynt/addComponentData?name=BlockVideoOembed', function ($data) {
12
+add_filter('Flynt/addComponentData?name=BlockVideoOembed', function($data) {
13 13
     $data['oembedLazyLoad'] = Oembed::setSrcAsDataAttribute(
14 14
         $data['oembed'],
15 15
         [
Please login to merge, or discard this patch.
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
 // Clean Up TinyMCE Buttons
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 // Clean Up TinyMCE Buttons
9 9
 
10 10
 // First Bar
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
 block discarded – undo
20 20
 });
21 21
 
22 22
 // Second Bar
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'])) {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 });
42 42
 
43 43
 // TODO: refactor this
44
-add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) {
44
+add_filter('acf/fields/wysiwyg/toolbars', function($toolbars) {
45 45
     // Load Toolbars and parse them into TinyMCE
46 46
     $config = getConfig();
47 47
     if ($config && isset($config['toolbars'])) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 function getBlockFormats($blockFormats)
72 72
 {
73 73
     if (!empty($blockFormats)) {
74
-        $blockFormatStrings = array_map(function ($tag, $label) {
74
+        $blockFormatStrings = array_map(function($tag, $label) {
75 75
             return "${label}=${tag}";
76 76
         }, $blockFormats, array_keys($blockFormats));
77 77
         return implode($blockFormatStrings, ';');
Please login to merge, or discard this patch.