Changes related to proper login/out behavior.
authorChuck Scott <cscott@gaslightmedia.com>
Wed, 1 Feb 2017 19:50:42 +0000 (14:50 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Wed, 1 Feb 2017 19:50:42 +0000 (14:50 -0500)
Removed some code that checked for redirection to various menus on entry.
Now entry assumes starting at main dashboard.
Contacts plugin must also be udated.
Some changes in the theme to remove login/out redirection are also required.

setup/adminHooks.php

index 9b8df25..040bc11 100644 (file)
@@ -101,7 +101,7 @@ add_action( 'add_meta_boxes', function() {
     );
 } );
 
-// Some menu related checks
+// Some menu related tests and changes
 function glmAdminMenuTests () {
     global $menu, $current_user, $config;
 
@@ -129,21 +129,6 @@ function glmAdminMenuTests () {
             }
         }
     }
-
-    // Also check if members are turned off
-    if (!$config['settings']['enable_members']) {
-
-        // Check if this is a request to the member menu
-        if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'glm-members-admin-menu-member') {
-
-            // Do an immediate redirect to the members menu page
-            $sendToUrl = get_admin_url() . "admin.php?page=glm-members-admin-menu-members";
-            wp_redirect($sendToUrl);
-            exit;
-        }
-
-    }
-
     return;
 
 }