Completed
Push — componentlibrary-sass ( f21ad1...dd20cf )
by
unknown
02:12
created
Features/AdminComponentPreview/functions.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             add_action('wp_enqueue_scripts', NS . 'enqueueComponentScripts');
57 57
             // adds Component Previews button to admin bar on front-end when logged in
58 58
             add_action('admin_bar_menu', function ($wpAdminBar) {
59
-               $title = __('Component Previews', 'flynt-starter-theme');
59
+                $title = __('Component Previews', 'flynt-starter-theme');
60 60
                 $wpAdminBar->add_node([
61 61
                     'id' => 'toggleComponentPreviews',
62 62
                     'title' => $title,
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
         if (is_admin()) {
39 39
             add_action('admin_enqueue_scripts', NS . 'enqueueComponentScripts');
40 40
             // add image to the flexible content component name
41
-            add_filter('acf/fields/flexible_content/layout_title', function ($title, $field, $layout, $i) {
41
+            add_filter('acf/fields/flexible_content/layout_title', function($title, $field, $layout, $i) {
42 42
                 $componentName = ucfirst($layout['name']);
43 43
                 $componentPath = "Components/{$componentName}";
44
-                $componentPreviewDesktopPath = Asset::requirePath("{$componentPath}/preview-desktop.jpg") ;
44
+                $componentPreviewDesktopPath = Asset::requirePath("{$componentPath}/preview-desktop.jpg");
45 45
                 $componentPreviewDesktopUrl = Asset::requireUrl("{$componentPath}/preview-desktop.jpg");
46 46
                 if (is_file($componentPreviewDesktopPath)) {
47 47
                     $newTitle = '<span class="flyntComponentPreview">';
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         } else {
56 56
             add_action('wp_enqueue_scripts', NS . 'enqueueComponentScripts');
57 57
             // adds Component Previews button to admin bar on front-end when logged in
58
-            add_action('admin_bar_menu', function ($wpAdminBar) {
58
+            add_action('admin_bar_menu', function($wpAdminBar) {
59 59
                $title = __('Component Previews', 'flynt-starter-theme');
60 60
                 $wpAdminBar->add_node([
61 61
                     'id' => 'toggleComponentPreviews',
Please login to merge, or discard this patch.