Completed
Push — componentlibrary ( 1302db...f10a3b )
by
unknown
01:28
created
Features/AdminComponentPreview/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 
6 6
 define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\');
7 7
 
8
-add_action('wp_enqueue_scripts', function () {
8
+add_action('wp_enqueue_scripts', function() {
9 9
     if (is_user_logged_in()) {
10 10
         Asset::register([
11 11
             'type' => 'script',
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     wp_localize_script('Flynt/assets/auth', 'wpData', $data);
21 21
 });
22 22
 
23
-add_action('wp_admin_enqueue_scripts', function () {
23
+add_action('wp_admin_enqueue_scripts', function() {
24 24
     $data = [
25 25
         'templateDirectoryUri' => get_template_directory_uri() . '/dist',
26 26
     ];
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     if (is_user_logged_in() || is_admin()) {
32 32
         if (is_admin()) {
33 33
             // add image to the flexible content component name
34
-            add_filter('acf/fields/flexible_content/layout_title', function ($title, $field, $layout, $i) {
34
+            add_filter('acf/fields/flexible_content/layout_title', function($title, $field, $layout, $i) {
35 35
                 $componentName = ucfirst($layout['name']);
36 36
                 $componentPath = "Components/{$componentName}";
37 37
                 $componentPreviewDesktopPath = Asset::requirePath("{$componentPath}/preview-desktop.jpg");
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             }, 11, 4);
48 48
         } else {
49 49
             // adds Component Previews button to admin bar on front-end when logged in
50
-            add_action('admin_bar_menu', function ($wpAdminBar) {
50
+            add_action('admin_bar_menu', function($wpAdminBar) {
51 51
                 $title = __('Component Previews', 'flynt-starter-theme');
52 52
                 $wpAdminBar->add_node([
53 53
                     'id' => 'toggleComponentPreviews',
Please login to merge, or discard this patch.
inc/theme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-add_action('after_setup_theme', function () {
3
+add_action('after_setup_theme', function() {
4 4
     add_theme_support('title-tag');
5 5
     add_theme_support('post-thumbnails');
6 6
 });
Please login to merge, or discard this patch.
inc/assets.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use Flynt\Utils\Asset;
4 4
 
5
-add_action('wp_enqueue_scripts', function () {
5
+add_action('wp_enqueue_scripts', function() {
6 6
     Asset::register([
7 7
         'name' => 'console-polyfill',
8 8
         'type' => 'script',
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     }
62 62
 });
63 63
 
64
-add_action('admin_enqueue_scripts', function () {
64
+add_action('admin_enqueue_scripts', function() {
65 65
     Asset::enqueue([
66 66
         'name' => 'Flynt/assets/admin',
67 67
         'path' => 'assets/admin.js',
Please login to merge, or discard this patch.
Components/BlockNotFound/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Utils\Options;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockNotFound', function ($data) {
7
+add_filter('Flynt/addComponentData?name=BlockNotFound', function($data) {
8 8
     return $data;
9 9
 });
10 10
 
Please login to merge, or discard this patch.
Components/BlockCookieNotice/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 
4 4
 use Flynt\Utils\Options;
5 5
 
6
-add_filter('Flynt/addComponentData?name=BlockCookieNotice', function ($data) {
6
+add_filter('Flynt/addComponentData?name=BlockCookieNotice', function($data) {
7 7
     return $data;
8 8
 });
9 9
 
Please login to merge, or discard this patch.
Components/ListTestimonialCards/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt;
6 6
 
7
-add_filter('Flynt/addComponentData?name=ListTestimonialCards', function ($data) {
7
+add_filter('Flynt/addComponentData?name=ListTestimonialCards', function($data) {
8 8
     return $data;
9 9
 });
10 10
 
Please login to merge, or discard this patch.
Components/HeroCta/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt;
6 6
 
7
-add_filter('Flynt/addComponentData?name=HeroCta', function ($data) {
7
+add_filter('Flynt/addComponentData?name=HeroCta', function($data) {
8 8
     return $data;
9 9
 });
10 10
 
Please login to merge, or discard this patch.
Components/ListSearchResults/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt\Utils\Asset;
6 6
 use Flynt\Utils\Options;
7 7
 
8
-add_filter('Flynt/addComponentData?name=ListSearchResults', function ($data) {
8
+add_filter('Flynt/addComponentData?name=ListSearchResults', function($data) {
9 9
     global $wp_query;
10 10
     $data['posts_found'] = $wp_query->found_posts;
11 11
     $searchQuery = get_search_query();
Please login to merge, or discard this patch.
Components/GridContentLists/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridContentLists', function ($data) {
7
+add_filter('Flynt/addComponentData?name=GridContentLists', function($data) {
8 8
     return $data;
9 9
 });
10 10
 
Please login to merge, or discard this patch.