Add call for requiring any routes.php file found in plugins setup folder
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 11 Mar 2019 17:42:30 +0000 (13:42 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 11 Mar 2019 17:43:24 +0000 (13:43 -0400)
This will be for adding routes for the REST API.

controllers/front.php

index 5d6aa9c..23a7bfd 100644 (file)
@@ -83,6 +83,11 @@ class glmMembersFront extends GlmPluginSupport
                 require_once $hooksFile;
             }
 
+            $routesFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH . $a['slug'] . '/setup/routes.php';
+            if ( is_file( $routesFile ) ) {
+                require_once $routesFile;
+            }
+
             // Check for a commonHooks.php file - Maps various add_filters to apply_filters for the add-on
             $commonFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.$a['slug'].'/setup/commonHooks.php';
             if (is_file($commonFile)) {