registering widget in the addOn array in config. creating admin hook for that specifi...
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 18 Sep 2018 20:28:19 +0000 (16:28 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 18 Sep 2018 20:28:19 +0000 (16:28 -0400)
index.php
setup/adminHooks.php

index 8673187..7368919 100644 (file)
--- a/index.php
+++ b/index.php
@@ -166,7 +166,9 @@ function glmMembersRegisterPackaging($addOns) {
                 'dbScriptPath' => GLM_MEMBERS_PACKAGING_PLUGIN_DB_SCRIPTS,
                 'dbVersions' => $GLOBALS['glmMembersPackagingDbVersions']
             ),
-            'requiredPages' => $GLOBALS['glmMembersPackagingRequiredPages']
+            'requiredPages' => $GLOBALS['glmMembersPackagingRequiredPages'],
+            'dashboardWidget' => GLM_MEMBERS_PACKAGING_PLUGIN_SLUG . "-dashboard-widget"
+
     );
 
     // Return the array with our data added
index 608c98d..8766786 100644 (file)
@@ -43,7 +43,15 @@ add_filter('glm-member-db-admin-management-hooksHelp', function($content) {
     10,
     2
 );
-
+add_filter(
+    GLM_MEMBERS_PACKAGING_PLUGIN_SLUG .'-dashboard-widget',
+    function ( $member = null ) {
+        $content = GLM_MEMBERS_PACKAGING_PLUGIN_SLUG;
+        return $content;
+    },
+    13,
+    1
+);
 add_filter(
     'glm-member-db-dashboard-member-widgets',
     function ( $member = null ) {