From: Laury GvR Date: Wed, 19 Sep 2018 17:06:41 +0000 (-0400) Subject: Added mostly valid data passed into the filter used for the dashboard widget display X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=06b7a62defa657002f2a7b82a903b6c22f1576fc;p=WP-Plugins%2Fglm-member-db-packaging.git Added mostly valid data passed into the filter used for the dashboard widget display --- 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