From: Steve Sutton Date: Thu, 17 Aug 2017 17:36:55 +0000 (-0400) Subject: Update the link from the event list page. X-Git-Tag: v1.0.0^2~466 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=856cb6bc1bb41a0fa9cf913ecf2ac46097d27c55;p=WP-Plugins%2Fglm-member-db-registrations.git Update the link from the event list page. Correcting the link for add reg or registration from event list. --- diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 54e529f..78bd8bf 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -47,30 +47,30 @@ add_filter('glm-member-db-admin-management-hooksHelp', function($content) { add_filter( 'glm_members_add_link_to_event_list_entry', function( $content ){ - + // Check if there's an existing reg_event record for the supplied event ID. require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php'; $RegEvent = new GlmDataRegistrationsRegEvent($this->wpdb, $this->config); - + // If we were passed a valid Event ID $eventId = $content-0; if ($eventId > 0) { // Try to get get the registrations data for this event $regEvent = $RegEvent->getEntry($eventId, 'event'); - - // If we received valid registrations data for this event then it's already in registrations + + // If we received valid registrations data for this event then it's already in registrations if ($regEvent) { - + // Return link title and URL for this event in registrations - return array('title' => 'Registrations', 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&option=dashboard&event=".$eventId); - + return array('title' => 'Registrations', 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-event®EventID=".$regEvent['id']); + } - + } - + // Since we must not have had a good event ID or didn't find the event in registrations, return title and url to add this event to registrations - return array('title' => 'Add Registrations To Event', 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&option=add&event=".$eventId); + return array('title' => 'Add Registrations To Event', 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-event&option=add&event=".$eventId); }, 10,