Completed
Push — constructionplanless ( d2cf5e...f41850 )
by Dominik
22s
created
inc/fieldGroups/pageComponents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use ACFComposer\ACFComposer;
4 4
 
5
-add_action('acf/init', function () {
5
+add_action('acf/init', function() {
6 6
     ACFComposer::registerFieldGroup([
7 7
         'name' => 'pageComponents',
8 8
         '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
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use ACFComposer\ACFComposer;
4 4
 
5
-add_action('acf/init', function () {
5
+add_action('acf/init', function() {
6 6
     ACFComposer::registerFieldGroup([
7 7
         'name' => 'postComponents',
8 8
         'title' => 'Post Components',
Please login to merge, or discard this patch.
inc/Utils/TwigExtensionFlynt.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -29,6 +29,9 @@
 block discarded – undo
29 29
         return $output;
30 30
     }
31 31
 
32
+    /**
33
+     * @param string $componentName
34
+     */
32 35
     public function renderComponent(Twig_Environment $env, $context, $componentName, $data = [], $withContext = true, $ignoreMissing = false, $sandboxed = false)
33 36
     {
34 37
         $data = $this->getComponentData($data, $componentName);
Please login to merge, or discard this patch.
inc/Bootstrap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 {
7 7
     public static function setTemplateDirectory()
8 8
     {
9
-        add_action('after_switch_theme', function () {
9
+        add_action('after_switch_theme', function() {
10 10
             $stylesheet = get_option('stylesheet');
11 11
 
12 12
             if (basename($stylesheet) !== 'templates') {
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
             }
15 15
         });
16 16
 
17
-        add_filter('stylesheet', function ($stylesheet) {
17
+        add_filter('stylesheet', function($stylesheet) {
18 18
             return dirname($stylesheet);
19 19
         });
20 20
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         }
34 34
 
35 35
         if (!$acfActive || !$flyntCoreActive) {
36
-            add_filter('template_include', function () {
36
+            add_filter('template_include', function() {
37 37
                 die(
38 38
                     'One or more required plugins are not activated! Please <a href="'
39 39
                     . esc_url(admin_url('plugins.php'))
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     protected static function notifyRequiredPluginIsMissing($pluginName)
49 49
     {
50
-        add_action('admin_notices', function () use ($pluginName) {
50
+        add_action('admin_notices', function() use ($pluginName) {
51 51
             echo "<div class=\"error\"><p>${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\""
52 52
                 . esc_url(admin_url('plugins.php')) . "\">plugin page</a>.</p></div>";
53 53
         });
Please login to merge, or discard this patch.
inc/assets.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 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',
Please login to merge, or discard this patch.
Components/NavigationMain/functions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,19 +7,19 @@  discard block
 block discarded – undo
7 7
 use Timber\Menu;
8 8
 use Flynt\Features\Acf\OptionPages;
9 9
 
10
-add_action('wp_enqueue_scripts', function () {
10
+add_action('wp_enqueue_scripts', function() {
11 11
     Component::enqueueAssets('NavigationMain');
12 12
 });
13 13
 
14
-add_filter('Flynt/addComponentData?name=NavigationMain', function ($data) {
14
+add_filter('Flynt/addComponentData?name=NavigationMain', function($data) {
15 15
     // set max level of the menu
16 16
     $data['maxLevel'] = 0;
17 17
     $data['menuSlug'] = !empty($data['menuSlug']) ? $data['menuSlug'] : 'navigation_main';
18 18
     $data['menu'] = has_nav_menu($data['menuSlug']) ? new Menu($data['menuSlug']) : false;
19 19
 
20 20
     if (!empty($data['menu'])) {
21
-        $data['menu']->items = array_map(function ($item) {
22
-            $item->btnClasses = array_filter($item->classes, function ($class) {
21
+        $data['menu']->items = array_map(function($item) {
22
+            $item->btnClasses = array_filter($item->classes, function($class) {
23 23
                 return stripos(trim($class), 'btn') === 0;
24 24
             });
25 25
             $item->classes = array_diff($item->classes, $item->btnClasses);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     return $data;
33 33
 });
34 34
 
35
-add_action('init', function () {
35
+add_action('init', function() {
36 36
     register_nav_menus([
37 37
         'navigation_main' => __('Navigation Main', 'flynt-starter-theme')
38 38
     ]);
Please login to merge, or discard this patch.
Components/GridDownloadPortrait/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Utils\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function ($data) {
7
+add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function($data) {
8 8
     Component::enqueueAssets('GridDownloadPortrait');
9 9
 
10 10
     if (!empty($data['items'])) {
11
-        $data['items'] = array_map(function ($item) {
11
+        $data['items'] = array_map(function($item) {
12 12
             if ($item['itemType'] === 'itemFile') {
13 13
                 $fileSize = filesize(get_attached_file($item['file']['id']));
14 14
                 $item['file']['fileSize'] = size_format($fileSize);
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\Utils\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridContentLists', function ($data) {
7
+add_filter('Flynt/addComponentData?name=GridContentLists', function($data) {
8 8
     Component::enqueueAssets('GridContentLists');
9 9
 
10 10
     return $data;
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\Utils\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=HeroCta', function ($data) {
7
+add_filter('Flynt/addComponentData?name=HeroCta', function($data) {
8 8
     Component::enqueueAssets('HeroCta');
9 9
 
10 10
     return $data;
Please login to merge, or discard this patch.