$eventAmenities = array();
$venues = false;
$startTimeOnly = 0;
+ $eventCategories = [];
if ( isset( $actionData['request']['member_only'] )
&& $memberOnly = filter_var( $actionData['request']['member_only'], FILTER_VALIDATE_BOOLEAN ) ) {
$emailNotification = ( isset($emailInfo['email_notification']) ? $emailInfo['email_notification'] : '' );
$cats = $categories->getList();
- foreach($cats as $cat){
- $eventCategories[] = $cat;
+ if( !empty($cats) ){
+ foreach($cats as $cat){
+ $eventCategories[] = $cat;
+ }
}
// Load recurrences class
//Load Events class
$events = new GlmDataEvents($this->wpdb, $this->config );
$newEvent = $events->newEntry();
-
+
+ $pageID = get_option('glm_members_database_option_event_confirmation_id');
+ $redirect_url = get_permalink($pageID);
+
// if form is submitted
if ( isset( $_REQUEST['newEvent'] ) && $_REQUEST['newEvent'] == "Add Event" ) {
// Check to see if the honey pot caught spam.
if ( isset( $_REQUEST['real_email'] ) && $_REQUEST['real_email'] ) {
- $view = 'confirmation';
+// $view = 'confirmation';
+ header("Location: $redirect_url"); /* Redirect browser */
} else {
// parse dates and times
date_default_timezone_set('America/New_York');
// remove the filter to avoid conflicts
remove_filter( 'wp_mail_content_type', 'set_content_type' );
}
-
- $view = 'confirmation';
+// $view = 'confirmation';
+ header("Location: $redirect_url"); /* Redirect browser */
}
}
'content' => '[glm-members-event-detail]',
'parent' => '0',
'underscored_title' => 'event_detail_id',
+ ),
+ 'Event Confirmation' => array(
+ 'title' => 'Event Confirmation',
+ 'content' => '<div class="success-content row"><div class="small-12 columns" id="success">
+ <h5> Thank you for submitting your event </h5>
+ <p> Your submission is currently pending, please allow up to 48 hours for it to be reviewed </p>
+ </div> </div>',
+ 'parent' => '0',
+ 'underscored_title' => 'event_confirmation_id',
)
);