Completed
Pull Request — master (#214)
by Dominik
05:45 queued 01:46
created
inc/fieldGroups/pageComponents.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
 use ACFComposer\ACFComposer;
4 4
 use Flynt\Components;
5 5
 
6
-add_action('Flynt/afterRegisterComponents', function () {
6
+add_action('Flynt/afterRegisterComponents', function() {
7 7
     ACFComposer::registerFieldGroup([
8 8
         'name' => 'pageComponents',
9 9
         'title' => 'Page Components',
Please login to merge, or discard this patch.
inc/fieldGroups/postComponents.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
 use ACFComposer\ACFComposer;
4 4
 use Flynt\Components;
5 5
 
6
-add_action('Flynt/afterRegisterComponents', function () {
6
+add_action('Flynt/afterRegisterComponents', function() {
7 7
     ACFComposer::registerFieldGroup([
8 8
         'name' => 'postComponents',
9 9
         'title' => 'Post Components',
Please login to merge, or discard this patch.
Components/FeatureGoogleAnalytics/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     return false;
16 16
 }
17 17
 
18
-add_filter('Flynt/addComponentData?name=FeatureGoogleAnalytics', function ($data) {
18
+add_filter('Flynt/addComponentData?name=FeatureGoogleAnalytics', function($data) {
19 19
     $googleAnalyticsOptions = Options::getGlobal('GoogleAnalytics');
20 20
 
21 21
     if ($googleAnalyticsOptions) {
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     return $data;
32 32
 });
33 33
 
34
-add_action('Flynt/thirdPartyCookies/initializeOptions', function () {
34
+add_action('Flynt/thirdPartyCookies/initializeOptions', function() {
35 35
     Options::addTranslatable('GoogleAnalytics', [
36 36
         [
37 37
             'label' => 'Accept Google Analytics label',
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
     ]);
44 44
 });
45 45
 
46
-add_action('wp_footer', function () {
46
+add_action('wp_footer', function() {
47 47
     $context = Timber::get_context();
48 48
     Timber::render_string('{{ renderComponent("FeatureGoogleAnalytics") }}', $context);
49 49
 });
50 50
 
51
-add_filter('Flynt/thirdPartyCookies', function ($features) {
51
+add_filter('Flynt/thirdPartyCookies', function($features) {
52 52
     $googleAnalyticsTranslatableOptions = Options::getTranslatable('GoogleAnalytics');
53 53
 
54 54
     $features = array_merge($features, [
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
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 use Flynt\FieldVariables;
7 7
 use Timber\Timber;
8 8
 
9
-add_action('wp_footer', function () {
9
+add_action('wp_footer', function() {
10 10
     $context = Timber::get_context();
11 11
     Timber::render_string('{{ renderComponent("BlockCookieNotice") }}', $context);
12 12
 });
Please login to merge, or discard this patch.
Components/GridPostsLatest/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 const POST_TYPE = 'post';
10 10
 
11
-add_filter('Flynt/addComponentData?name=GridPostsLatest', function ($data) {
11
+add_filter('Flynt/addComponentData?name=GridPostsLatest', function($data) {
12 12
     $postType = POST_TYPE;
13 13
 
14 14
     $data['taxonomies'] = $data['taxonomies'] ?: [];
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     $data['items'] = Timber::get_posts([
17 17
         'post_status' => 'publish',
18 18
         'post_type' => $postType,
19
-        'category' => join(',', array_map(function ($taxonomy) {
19
+        'category' => join(',', array_map(function($taxonomy) {
20 20
             return $taxonomy->term_id;
21 21
         }, $data['taxonomies'])),
22 22
         'posts_per_page' => $data['options']['columns'],
Please login to merge, or discard this patch.
inc/assets.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
 use Flynt\Utils\Asset;
4 4
 use Flynt\Utils\ScriptLoader;
5 5
 
6
-call_user_func(function () {
6
+call_user_func(function() {
7 7
     $loader = new ScriptLoader();
8 8
     add_filter('script_loader_tag', [$loader, 'filterScriptLoaderTag'], 10, 2);
9 9
 });
10 10
 
11
-add_action('wp_enqueue_scripts', function () {
11
+add_action('wp_enqueue_scripts', function() {
12 12
     Asset::enqueue([
13 13
         'name' => 'Flynt/assets',
14 14
         'path' => 'assets/main.js',
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     ]);
23 23
 });
24 24
 
25
-add_action('admin_enqueue_scripts', function () {
25
+add_action('admin_enqueue_scripts', function() {
26 26
     Asset::enqueue([
27 27
         'name' => 'Flynt/assets/admin',
28 28
         'path' => 'assets/admin.js',
Please login to merge, or discard this patch.
inc/baseStyle.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
 function setDocumentTitle()
23 23
 {
24 24
     // prevent yoast overwriting the title
25
-    add_filter('pre_get_document_title', function ($title) {
25
+    add_filter('pre_get_document_title', function($title) {
26 26
         return '';
27 27
     }, 99);
28 28
 
29 29
     // set custom title and keep the default separator and site name
30
-    add_filter('document_title_parts', function ($title) {
30
+    add_filter('document_title_parts', function($title) {
31 31
         $title['title'] = 'Base Style';
32 32
         return $title;
33 33
     }, 99);
Please login to merge, or discard this patch.
lib/Init.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
         $pluginUrl = esc_url(admin_url('plugins.php'));
54 54
         $message = ["${pluginName} plugin not activated. Make sure you activate the plugin on the <a href=\"${pluginUrl}\">plugin page</a>."];
55 55
         $options = [
56
-          'type' => 'error',
57
-          'title' => 'Flynt is missing a required plugin',
58
-          'dismissible' => false,
56
+            'type' => 'error',
57
+            'title' => 'Flynt is missing a required plugin',
58
+            'dismissible' => false,
59 59
         ];
60 60
 
61 61
         $manager->addNotice($message, $options);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
         if (!$acfActive) {
36 36
             self::notifyRequiredPluginIsMissing('<a href="https://www.advancedcustomfields.com/pro/">Advanced Custom Fields PRO</a>');
37
-            add_filter('template_include', function () {
37
+            add_filter('template_include', function() {
38 38
                 die(
39 39
                     'One or more required plugins are not activated! Please <a href="'
40 40
                     . esc_url(admin_url('plugins.php'))
Please login to merge, or discard this patch.
inc/theContentFix.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     }
16 16
 }
17 17
 
18
-add_filter('wp_insert_post_data', function ($data, $postArr) {
18
+add_filter('wp_insert_post_data', function($data, $postArr) {
19 19
     if (in_array(
20 20
         $postArr['post_type'],
21 21
         [
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     return $data;
35 35
 }, 99, 2);
36 36
 
37
-add_shortcode('flyntTheContent', function ($attrs) {
37
+add_shortcode('flyntTheContent', function($attrs) {
38 38
     $postId = $attrs['id'];
39 39
     // in case the post id was not set correctly and is 0
40 40
     if (!empty($postId)) {
Please login to merge, or discard this patch.