Completed
Push — constructionplanless ( c6433a...a84d3d )
by Dominik
01:33
created
Features/CleanRss/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  *
13 13
  * Don't return the default description in the RSS feed if it hasn't been changed
14 14
  */
15
-add_filter('get_bloginfo_rss', function ($bloginfo) {
15
+add_filter('get_bloginfo_rss', function($bloginfo) {
16 16
     $defaultTagline = 'Just another WordPress site';
17 17
     return ($bloginfo === $defaultTagline) ? '' : $bloginfo;
18 18
 });
Please login to merge, or discard this patch.
Features/CleanHead/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
  * Remove self-closing tag
13 13
  *
14 14
  */
15
-add_action('init', function () {
15
+add_action('init', function() {
16 16
     // Originally from http://wpengineer.com/1438/wordpress-header/
17 17
     remove_action('wp_head', 'feed_links_extra', 3);
18 18
     add_action('wp_head', 'ob_start', 1, 0);
19
-    add_action('wp_head', function () {
19
+    add_action('wp_head', function() {
20 20
         $pattern = '/.*' . preg_quote(esc_url(get_feed_link('comments_' . get_default_feed())), '/') . '.*[\r\n]+/';
21 21
         echo preg_replace($pattern, '', ob_get_clean());
22 22
     }, 3, 0);
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
  *
45 45
  * Clean up output of stylesheet <link> tags
46 46
  */
47
-add_filter('style_loader_tag', function ($input) {
47
+add_filter('style_loader_tag', function($input) {
48 48
     preg_match_all(
49 49
         "!<link rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)' type='text/css' media='(.*)' />!",
50 50
         $input,
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
  *
64 64
  * Clean up output of <script> tags
65 65
  */
66
-add_filter('script_loader_tag', function ($input) {
66
+add_filter('script_loader_tag', function($input) {
67 67
     $input = str_replace("type='text/javascript' ", '', $input);
68 68
     return str_replace("'", '"', $input);
69 69
 });
Please login to merge, or discard this patch.
Components/LayoutSinglePost/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 Timber\Timber;
6 6
 use Flynt\Features\Components\Component;
7 7
 
8
-add_action('wp_enqueue_scripts', function () {
8
+add_action('wp_enqueue_scripts', function() {
9 9
     Component::enqueueAssets('LayoutSinglePost');
10 10
 });
11 11
 
12
-add_filter('Flynt/addComponentData?name=LayoutSinglePost', function ($data) {
12
+add_filter('Flynt/addComponentData?name=LayoutSinglePost', function($data) {
13 13
     $query = !empty($data['query']) ? $data['query'] : false;
14 14
     $post = Timber::get_post($query);
15 15
     if (!empty($post)) {
Please login to merge, or discard this patch.
Components/ComponentLoaderStatic/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Acf\OptionPages;
6 6
 
7
-add_filter('Flynt/addComponentData?name=ComponentLoaderStatic', function ($data, $parentData) {
7
+add_filter('Flynt/addComponentData?name=ComponentLoaderStatic', function($data, $parentData) {
8 8
     $optionPage = (array_key_exists('optionPage', $data)) ? $data['optionPage'] : [];
9 9
     if (is_array($optionPage) &&
10 10
         array_key_exists('optionType', $optionPage) &&
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
     return $data;
24 24
 }, 10, 2);
25 25
 
26
-add_filter('Flynt/dynamicSubcomponents?name=ComponentLoaderStatic', function ($areas, $data, $parentData) {
26
+add_filter('Flynt/dynamicSubcomponents?name=ComponentLoaderStatic', function($areas, $data, $parentData) {
27 27
     if (!empty($areas['components'])) {
28
-        $areas['components'] = array_map(function ($component) use ($data, $parentData) {
28
+        $areas['components'] = array_map(function($component) use ($data, $parentData) {
29 29
             if (isset($component['customData']) && isset($component['customData']['filterArgument'])) {
30 30
                 $filterArgument = $component['customData']['filterArgument'] . '_';
31 31
                 $componentData = [];
Please login to merge, or discard this patch.
Components/ComponentLoaderFlexible/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Acf\OptionPages;
6 6
 
7
-add_filter('Flynt/addComponentData?name=ComponentLoaderFlexible', function ($data) {
7
+add_filter('Flynt/addComponentData?name=ComponentLoaderFlexible', function($data) {
8 8
     $optionPage = (array_key_exists('optionPage', $data)) ? $data['optionPage'] : [];
9 9
     if (is_array($optionPage) &&
10 10
         array_key_exists('optionType', $optionPage) &&
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     return $data;
22 22
 });
23 23
 
24
-add_filter('Flynt/dynamicSubcomponents?name=ComponentLoaderFlexible', function ($areas, $data, $parentData) {
24
+add_filter('Flynt/dynamicSubcomponents?name=ComponentLoaderFlexible', function($areas, $data, $parentData) {
25 25
     $fieldGroup = $data['fieldGroup'];
26 26
     if (array_key_exists($fieldGroup, $data) &&
27 27
         $data[$fieldGroup] !== false
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $fieldGroupData = $parentData['post']->fields[$fieldGroup];
34 34
     }
35 35
     if (isset($fieldGroupData)) {
36
-        $areas['components'] = array_map(function ($field) use ($parentData) {
36
+        $areas['components'] = array_map(function($field) use ($parentData) {
37 37
             return [
38 38
                 'name' => ucfirst($field['acf_fc_layout']),
39 39
                 'customData' => $field,
Please login to merge, or discard this patch.
Features/CustomPostTypes/Translator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
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-starter-theme')
57 57
                 ]);
Please login to merge, or discard this patch.
Features/AdminComponentPreview/functions.php 1 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_menu([
61 61
                     'id' => 'toggleComponentPreviews',
Please login to merge, or discard this patch.
Features/Components/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 // register all components
13 13
 $componentPath = trailingslashit(Feature::getOption('flynt-components', 0));
14 14
 
15
-add_action('Flynt/afterRegisterFeatures', function () use ($componentPath) {
15
+add_action('Flynt/afterRegisterFeatures', function() use ($componentPath) {
16 16
     if (is_dir($componentPath)) {
17 17
         $components = [];
18
-        FileLoader::iterateDir($componentPath, function ($dir) use (&$components) {
18
+        FileLoader::iterateDir($componentPath, function($dir) use (&$components) {
19 19
             if ($dir->isDir()) {
20 20
                 $components[] = $dir->getFilename();
21 21
             }
@@ -26,6 +26,6 @@  discard block
 block discarded – undo
26 26
 });
27 27
 
28 28
 // set Component Path
29
-add_filter('Flynt/componentPath', function ($defaultPath, $componentName) use ($componentPath) {
29
+add_filter('Flynt/componentPath', function($defaultPath, $componentName) use ($componentPath) {
30 30
     return $componentPath . $componentName;
31 31
 }, 10, 2);
Please login to merge, or discard this patch.
Features/Acf/GoogleMaps.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
 {
7 7
     public static function init()
8 8
     {
9
-        add_filter('acf/fields/google_map/api', function ($api) {
9
+        add_filter('acf/fields/google_map/api', function($api) {
10 10
             $apiKey = OptionPages::get('globalOptions', 'feature', 'Acf', 'googleMapsApiKey');
11 11
             if ($apiKey) {
12 12
                 $api['key'] = $apiKey;
Please login to merge, or discard this patch.