From fa48cea1e79f8e5db28462b51d4beb0df9ab3127 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 24 Oct 2019 15:18:45 -0400 Subject: [PATCH] adding a new filter to get a list of the activated addons added new "glm_list_addons" filter to adminhooks to get list of add on slugs --- setup/adminHooks.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 9c509a61..7c8d2418 100755 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -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 -- 2.17.1