Plugin Directory

Changeset 1819988


Ignore:
Timestamp:
02/11/2018 02:42:27 PM (8 years ago)
Author:
poisl
Message:

added check for missing plugin settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • event-scheduler/trunk/public/class-event_scheduler-public.php

    r1819936 r1819988  
    161161        $action = $div->get_request_parameter('action');
    162162
    163         // Get next event date
    164         $nextEventDate = $div->nextEventDate($offset);
    165 
    166163        // Initialize required plugin otions
    167164        $options = get_option($this->plugin_name);
    168165        $eventLocation = $options['event_default_location'];
    169166        $alternateLocation = $options['event_alternate_location'];
     167
     168        // Check if plugin settings are configured
     169        if (!$eventLocation) {
     170            die(__('Please configure the plugin settings first.'));
     171        }
     172
     173        // Get next event date
     174        $nextEventDate = $div->nextEventDate($offset);
    170175
    171176        // Check if event exists and create it if necessary
Note: See TracChangeset for help on using the changeset viewer.