changing include to include_once in the filter for member categories in fronthooks.php
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 27 Sep 2016 13:27:04 +0000 (09:27 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 27 Sep 2016 13:27:04 +0000 (09:27 -0400)
setup/frontHooks.php

index a331294..bb46342 100644 (file)
@@ -266,8 +266,8 @@ 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);
+    include_once GLM_MEMBERS_PLUGIN_CLASS_PATH . '/data/dataCategories.php';
+    $categories = new GlmDataCategories( $this->wpdb, $this->config );
     return $categories->getListSortedParentChild();
 });
 add_filter('glm_associate_config', function() {