adding filter to get member categories for use in the theme's search
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 26 Sep 2016 13:38:56 +0000 (09:38 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 26 Sep 2016 13:38:56 +0000 (09:38 -0400)
setup/frontHooks.php

index e584ff4..a331294 100644 (file)
@@ -265,6 +265,11 @@ function glm_members_only_template( $template ) {
 /*
  *
  */
+add_filter('member_categories', function(){
+    include GLM_MEMBERS_PLUGIN_CLASS_PATH . '/data/dataCategories.php';
+    $categories = new GlmDataCategories($this->wpdb, $this->config);
+    return $categories->getListSortedParentChild();
+});
 add_filter('glm_associate_config', function() {
     return $this->config;
 });