From 06b7a62defa657002f2a7b82a903b6c22f1576fc Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Wed, 19 Sep 2018 13:06:41 -0400 Subject: [PATCH] Added mostly valid data passed into the filter used for the dashboard widget display --- setup/adminHooks.php | 55 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 8766786..38a3022 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -46,8 +46,59 @@ add_filter('glm-member-db-admin-management-hooksHelp', function($content) { add_filter( GLM_MEMBERS_PACKAGING_PLUGIN_SLUG .'-dashboard-widget', function ( $member = null ) { - $content = GLM_MEMBERS_PACKAGING_PLUGIN_SLUG; - return $content; + //$content = GLM_MEMBERS_PACKAGING_PLUGIN_SLUG; + $content = [ + 'buttons' => [ + 'order' => -1, + 'type' => 'button', + 'Add Package' => '#', + ], + 'quicklinks' => [ + 'order' => 0, + 'type' => 'quicklinks', + 'Dashboard' => '#db', + 'Advanced Search' => '#as', + 'Settings' => '#st', + ], + 'entity_amount' => [ + 'order' => 1, + 'type' => 'entity_amount', + 'table' => GLM_MEMBERS_PACKAGING_PLUGIN_DB_PREFIX."packages", + ], + 'search' => [ + 'order' => 2, + 'type' => 'textsearch', + 'table' => GLM_MEMBERS_PACKAGING_PLUGIN_DB_PREFIX."packages", + 'fields' => [ + 'id', + 'name', + ] + ], + 'pending' => [ + 'order' => 3, + 'type' => 'list', + 'table' => GLM_MEMBERS_PACKAGING_PLUGIN_DB_PREFIX."packages", + 'fields' => [ + 'id', + 'name', + ], + 'where' => 'status = '.$this->config['status_numb']['Pending'] + ], + 'expired' => [ + 'order' => 4, + 'type' => 'list', + 'table' => GLM_MEMBERS_PACKAGING_PLUGIN_DB_PREFIX."packages", + 'fields' => [ + 'id', + 'name', + ], + //'where' => 'status = '.$this->config['status_numb']['Expired'] + ] + ]; + + return $content; + + }, 13, 1 -- 2.17.1