From f3bdf1e420c87f3257d7e5ff4c36df7da1c6ba58 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 17 May 2017 10:31:00 -0400 Subject: [PATCH] Update for the member only menu The get option needs to use the Constant and not the string. Putting a check for the define first before creating the menu. --- setup/adminHooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 6a7ad5ff..2c452099 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -53,9 +53,9 @@ register_nav_menu($menuSlug, $menuName); $menuExists = wp_get_nav_menu_object( $menuName ); // If it doesn't exist, let's create it. -if( !$menuExists){ +if( !$menuExists && defined( 'GLM_MEMBERS_PLUGIN_MEMBERS_ONLY_ID' ) ){ - $membersOnlyPageID = get_option('GLM_MEMBERS_PLUGIN_MEMBERS_ONLY_ID'); + $membersOnlyPageID = get_option(GLM_MEMBERS_PLUGIN_MEMBERS_ONLY_ID); // $menu_id = wp_create_nav_menu($menuName); -- 2.17.1