adding a new filter to get a list of the activated addons
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 24 Oct 2019 19:18:45 +0000 (15:18 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 24 Oct 2019 19:18:45 +0000 (15:18 -0400)
added new "glm_list_addons" filter to adminhooks to get list of add on slugs

setup/adminHooks.php

index 9c509a6..7c8d241 100755 (executable)
@@ -297,6 +297,14 @@ add_filter( 'glm-hook-list-map-items-by-latlon', function( $data ) {
 
 });
 
+add_filter("glm_list_addons", function( ) {
+    $add_on_slugs = array();
+    foreach($this->config['addOns'] as $add_on){
+        array_push($add_on_slugs, $add_on['slug']);
+    }
+    return $add_on_slugs;
+});
+
 // Add Filter for the glm_associate_phone_filter
 add_filter( 'glm_associate_phone_filter', function( $phone ) {
     // Passing phone to Plugin Support Function