normalizing spaces between the fat arrows in the adminhooks widget filter. removing...
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 21 Sep 2018 17:55:36 +0000 (13:55 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 21 Sep 2018 17:55:36 +0000 (13:55 -0400)
replacing them as id fields in the widget filter arrays

setup/adminHooks.php

index bc5e698..6e72d75 100644 (file)
@@ -59,44 +59,48 @@ add_filter(
         */
 
         $content = [
-            'title' => 'Packaging',
-            'components' => [
-                'buttons' => [
-                    'order' => -1,
-                    'template' => 'buttons',
-                    'buttons' => [
+            'title'         => 'Packaging',
+            'components'    => [
+                [
+                    'id'        => 'topButtons',
+                    'order'     => -1,
+                    'template'  => 'buttons',
+                    'buttons'   => [
                         'add-package' => [
-                            'content' => 'Add Package',
-                            'url' => $packagingIndexPage . "&option=add",
-                            'classes' => '',
+                            'content'   => 'Add Package',
+                            'url'       => $packagingIndexPage . "&option=add",
+                            'classes'   => '',
                         ],
                     ],
                 ],
-                'quickLinks' => [
-                    'order' => 0,
-                    'template' => 'quickLinks',
+                [
+                    'id'         => 'quickLinks',
+                    'order'      => 0,
+                    'template'   => 'quickLinks',
                     'quickLinks' => [
                         'dashboard' => [
                             'content' => 'Dashboard',
-                            'url' => $packagingIndexPage . "&option=dashboard",
+                            'url'     => $packagingIndexPage . "&option=dashboard",
                         ],
                         'search' => [
                             'content' => 'Advanced Search',
-                            'url' => $packagingIndexPage . "&option=search",
+                            'url'     => $packagingIndexPage . "&option=search",
                         ],
                         'settings' => [
-                            'content' => 'Settings',
-                            'url' => '#set',
+                            'content'   => 'Settings',
+                            'url'       => '#set',
                         ]
                     ],
                 ],
-                'entityAmount' => [
-                    'order' => 1,
+                [
+                    'id'       => 'entityAmount',
+                    'order'    => 1,
                     'template' => 'entityAmount',
-                    'table' => $packagesTable,
-                    'url' => $packagingIndexPage . "&option=search",
+                    'table'    => $packagesTable,
+                    'url'      => $packagingIndexPage . "&option=search",
                 ],
-                'textSearch' => [
+                [
+                    'id'        => 'textSearch',
                     'order'     => 2,
                     'template'  => 'textSearch',
                     'entityID'  => 'packageID',
@@ -105,35 +109,38 @@ add_filter(
                     'where'     => 'title',
                     'resultUrl' => $packagingIndexPage . "&option=edit",
                 ],
-                'active' => [
-                    'title' => "Active Packages",
-                    'slug' => "active-packages",
-                    'order' => 3,
-                    'template' => 'list',
+                [
+                    'id'        => 'active',
+                    'title'     => "Active Packages",
+                    'slug'      => "active-packages",
+                    'order'     => 3,
+                    'template'  => 'list',
                     'entityID'  => 'packageID',
-                    'table' => $packagesTable,
-                    'fields' => "id, title, ref_type, ref_dest",
-                    'where' => 'status='.$this->config['status_numb']['Active'],
+                    'table'     => $packagesTable,
+                    'fields'    => "id, title, ref_type, ref_dest",
+                    'where'     => 'status='.$this->config['status_numb']['Active'],
                     'resultUrl' => $packagingEditPage,
                 ],
-                'pending' => [
-                    'title' => "Pending Packages",
-                    'slug' => "pending-packages",
-                    'order' => 4,
-                    'template' => 'list',
+                [
+                    'id'        => 'pending', 
+                    'title'     => "Pending Packages",
+                    'slug'      => "pending-packages",
+                    'order'     => 4,
+                    'template'  => 'list',
                     'entityID'  => 'packageID',
-                    'table' => $packagesTable,
-                    'fields' => "id, title, ref_type, ref_dest",
-                    'where' => 'status='.$this->config['status_numb']['Pending'],
+                    'table'     => $packagesTable,
+                    'fields'    => "id, title, ref_type, ref_dest",
+                    'where'     => 'status='.$this->config['status_numb']['Pending'],
                     'resultUrl' => $packagingEditPage,
                 ],
-                'expired' => [
-                    'title' => "Expired Packages",
-                    'slug' => "expired-packages",
-                    'template' => 'list',
+                [
+                    'id'        => 'expired',
+                    'title'     => "Expired Packages",
+                    'slug'      => "expired-packages",
+                    'template'  => 'list',
                     'entityID'  => 'packageID',
-                    'table' => $packagesTable,
-                    'fields' => "id, title, ref_type, ref_dest",
+                    'table'     => $packagesTable,
+                    'fields'    => "id, title, ref_type, ref_dest",
                     // 'fields' => [
                     //     'id',
                     //     'title',
@@ -145,8 +152,6 @@ add_filter(
         ];
 
          return $content;
-        
-
     },
     13,
     1