moving the buttons into the header of the summary dashboard widget
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 19 Oct 2018 20:09:33 +0000 (16:09 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 19 Oct 2018 20:09:33 +0000 (16:09 -0400)
setup/adminHooks.php

index 1663a68..35ee385 100644 (file)
@@ -89,6 +89,16 @@ add_filter(
 
         $content = [
             'title'         => 'Packaging',
+            'widgetButtons' => [
+                [
+                    'id'            => 'add-package',
+                    'content'       => 'Add',
+                    'url'           => $packagingIndexPage . "&option=add",
+                    'classes'       => '',
+                    'styles'        => '',
+                    'data'          => ''
+                ]
+            ],
             'components'    => [
                 [
                     'id'         => 'quickLinks',
@@ -109,18 +119,6 @@ add_filter(
                         ]
                     ],
                 ],
-                [
-                    'id'        => 'topButtons',
-                    'order'     => 0,
-                    'template'  => 'buttons',
-                    'buttons'   => [
-                        'add-package' => [
-                            'content'   => 'Add New',
-                            'url'       => $packagingIndexPage . "&option=add",
-                            'classes'   => '',
-                        ],
-                    ],
-                ],
                 [
                     'id'       => 'entityAmount',
                     'title'    => 'Number of Packages',