Better and more complete data structure for quick links and buttons
authorLaury GvR <laury@gaslightmedia.com>
Wed, 19 Sep 2018 19:59:22 +0000 (15:59 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 19 Sep 2018 19:59:22 +0000 (15:59 -0400)
setup/adminHooks.php

index 85488a2..790d790 100644 (file)
@@ -48,26 +48,50 @@ add_filter(
     function ( $member = null ) {
         //$content = GLM_MEMBERS_PACKAGING_PLUGIN_SLUG;
         $content = [
+            'title' => 'Packaging',
             'buttons' => [
                 'order' => -1,
-                'type' => 'button',
-                'Add Package' => '#',
+                'type' => 'buttons',
+                'buttons' => [
+                    'add-package' => [
+                        'content' => 'Add Package',
+                        'url' => '#AP',
+                        'classes' => '',
+                    ],
+                    'second-button' => [
+                        'content' => 'Do Other Stuff',
+                        'url' => '#DOS',
+                        'classes' => '',
+                        'styles' => 'top: 50px;',
+                    ]
+                ],
             ],
-            'quicklinks' => [
+            'quickLinks' => [
                 'order' => 0,
-                'type' => 'quicklinks',
-                'Dashboard' => '#db',
-                'Advanced Search' => '#as',
-                'Settings' => '#st',
+                'type' => 'quickLinks',
+                'quickLinks' => [
+                    'dashboard' => [
+                        'content' => 'Dashboard',
+                        'url' => '#dbd',
+                    ],
+                    'search' => [
+                        'content' => 'Advanced Search',
+                        'url' => '#DOS',
+                    ],
+                    'settings' => [
+                        'content' => 'Settings',
+                        'url' => '#set',
+                    ]
+                ],
             ],
-            'entity_amount' => [
+            'entityAmount' => [
                 'order' => 1,
-                'type' => 'entity_amount',
+                'type' => 'entityAmount',
                 'table' => GLM_MEMBERS_PACKAGING_PLUGIN_DB_PREFIX."packages",
             ],
-            'search' => [
+            'textSearch' => [
                 'order' => 2,
-                'type' => 'textsearch',
+                'type' => 'textSearch',
                 'table' => GLM_MEMBERS_PACKAGING_PLUGIN_DB_PREFIX."packages",
                 'fields' => [
                     'id',