@@ -7,7 +7,7 @@ discard block |
||
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 | return [ |
12 | 12 | 'formatselect', |
13 | 13 | 'styleselect', |
@@ -48,17 +48,17 @@ discard block |
||
48 | 48 | }); |
49 | 49 | |
50 | 50 | // Second Bar |
51 | -add_filter('mce_buttons_2', function ($buttons) { |
|
51 | +add_filter('mce_buttons_2', function($buttons) { |
|
52 | 52 | return []; |
53 | 53 | }); |
54 | 54 | |
55 | -add_filter('tiny_mce_before_init', function ($init) { |
|
55 | +add_filter('tiny_mce_before_init', function($init) { |
|
56 | 56 | // Add block format elements you want to show in dropdown |
57 | 57 | $init['block_formats'] = 'Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6'; |
58 | 58 | return $init; |
59 | 59 | }); |
60 | 60 | |
61 | -add_filter('tiny_mce_before_init', function ($init_array) { |
|
61 | +add_filter('tiny_mce_before_init', function($init_array) { |
|
62 | 62 | $style_formats = array( |
63 | 63 | [ |
64 | 64 | 'title' => 'Turquoise Colour ', |
@@ -52,7 +52,7 @@ |
||
52 | 52 | if (is_array($value)) { |
53 | 53 | // Loop through array and apply translations while keeping keys intact |
54 | 54 | // NOTE: assuming it's a single dimensional array |
55 | - return array_reduce(array_keys($value), function ($carry, $key) use ($value) { |
|
55 | + return array_reduce(array_keys($value), function($carry, $key) use ($value) { |
|
56 | 56 | return array_merge($carry, [ |
57 | 57 | $key => _x($value[$key], $key, 'flynt-theme') |
58 | 58 | ]); |
@@ -51,7 +51,7 @@ |
||
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-theme') |
57 | 57 | ]); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | add_action('admin_enqueue_scripts', NS . 'enqueueComponentScripts'); |
40 | 40 | |
41 | 41 | // add image to the flexible content component name |
42 | - add_filter('acf/fields/flexible_content/layout_title', function ($title, $field, $layout, $i) { |
|
42 | + add_filter('acf/fields/flexible_content/layout_title', function($title, $field, $layout, $i) { |
|
43 | 43 | $componentPath = "/Components/$layout[name]/"; |
44 | 44 | $componentPreviewDesktopPath = get_template_directory() . $componentPath . 'preview-desktop.jpg'; |
45 | 45 | $componentPreviewDesktopUrl = get_template_directory_uri() . $componentPath . 'preview-desktop.jpg'; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } else { |
57 | 57 | add_action('wp_enqueue_scripts', NS . 'enqueueComponentScripts'); |
58 | 58 | // adds Component Previews button to admin bar on front-end when logged in |
59 | - add_action('admin_bar_menu', function ($wpAdminBar) { |
|
59 | + add_action('admin_bar_menu', function($wpAdminBar) { |
|
60 | 60 | $title = __('Component Previews', 'flynt-theme'); |
61 | 61 | $wpAdminBar->add_menu([ |
62 | 62 | 'id' => 'toggleComponentPreviews', |
@@ -6,15 +6,15 @@ |
||
6 | 6 | add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) { |
7 | 7 | $toolbars['product'] = []; |
8 | 8 | $toolbars['product'][1] = [ |
9 | - 'bold', |
|
10 | - 'italic', |
|
11 | - 'underline', |
|
12 | - '|', |
|
13 | - 'link', |
|
14 | - 'unlink', |
|
15 | - '|', |
|
16 | - 'undo', |
|
17 | - 'redo', |
|
9 | + 'bold', |
|
10 | + 'italic', |
|
11 | + 'underline', |
|
12 | + '|', |
|
13 | + 'link', |
|
14 | + 'unlink', |
|
15 | + '|', |
|
16 | + 'undo', |
|
17 | + 'redo', |
|
18 | 18 | ]; |
19 | 19 | return $toolbars; |
20 | 20 | }); |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Flynt\Features\ProductTinyMce; |
4 | 4 | |
5 | -add_action('init', function () { |
|
6 | - add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) { |
|
5 | +add_action('init', function() { |
|
6 | + add_filter('acf/fields/wysiwyg/toolbars', function($toolbars) { |
|
7 | 7 | $toolbars['product'] = []; |
8 | 8 | $toolbars['product'][1] = [ |
9 | 9 | 'bold', |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Flynt\Features\Navigation; |
4 | 4 | |
5 | -add_action('init', function () { |
|
5 | +add_action('init', function() { |
|
6 | 6 | register_nav_menus([ |
7 | 7 | 'navigation_main' => __('Navigation Main', 'flynt-theme'), |
8 | 8 | 'navigation_footer' => __('Navigation Footer', 'flynt-theme') |
@@ -9,10 +9,10 @@ |
||
9 | 9 | $manager = AdminNoticeManager::getInstance(); |
10 | 10 | $messages = ['Please fill Some Feature Number']; |
11 | 11 | $options = [ |
12 | - 'type' => 'error', |
|
13 | - 'title' => 'Some Product Feature', |
|
14 | - 'dismissible' => true, |
|
15 | - 'filenames' => 'functions.php' |
|
12 | + 'type' => 'error', |
|
13 | + 'title' => 'Some Product Feature', |
|
14 | + 'dismissible' => true, |
|
15 | + 'filenames' => 'functions.php' |
|
16 | 16 | ]; |
17 | 17 | $manager->addNotice($messages, $options); |
18 | 18 | } |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use Flynt\Features\Acf\OptionPages; |
4 | 4 | use Flynt\Features\AdminNotices\AdminNoticeManager; |
5 | 5 | |
6 | -add_action('init', function () { |
|
6 | +add_action('init', function() { |
|
7 | 7 | $someFeatureNumber = OptionPages::getOption('globalOptions', 'feature', 'someProductFeature', 'someFeatureNumber'); |
8 | 8 | if (!$someFeatureNumber) { |
9 | 9 | $manager = AdminNoticeManager::getInstance(); |