From fd2c90f6ba5f8429f641f2e3552821604ff5a50a Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Wed, 19 Sep 2018 15:59:22 -0400 Subject: [PATCH] Better and more complete data structure for quick links and buttons --- setup/adminHooks.php | 46 +++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 85488a2..790d790 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -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', -- 2.17.1