Plugin Directory

Changeset 1393770


Ignore:
Timestamp:
04/13/2016 07:44:33 AM (10 years ago)
Author:
gorbachiov
Message:

version 1.4.2

Location:
eventupon-calendar/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • eventupon-calendar/trunk/eventupon-calendar.php

    r1392873 r1393770  
    44Plugin URI: https://wordpress.org/plugins/eventupon-calendar/
    55Description: Displays events from EventUpon.com, activate and place [eu-calendar] tag to a page you want to have the calendar.
    6 Version: 1.4.1
     6Version: 1.4.2
    77Author: Max Kovrigovich
    88Author URI: https://www.linkedin.com/in/max-kovrigovich-007bb888
     
    3232        const EU_CALENDAR_TAG = 'eu-calendar';
    3333        const EU_CALENDAR_BASE = 'www.eventupon.com';
    34         //const EU_CALENDAR_BASE = 'www.eventupon.us';
     34//        const EU_CALENDAR_BASE = 'www.eventupon.us';
    3535        //const EU_CALENDAR_BASE = 'www.eventupon.dev';
    3636        //const EU_CALENDAR_BASE = 'www.eventupon';
    3737        const PREFIX = 'eventupon_calendar';
    3838
     39
     40        private static $https_prefix;
    3941        private $event_api_url;
    4042        private $token;
     
    5658            require_once(sprintf("%s/settings.php", dirname(__FILE__)));
    5759            $this->pageSettings = new EventUpon_Calendar_Settings();
     60            self::$https_prefix = get_option(EventUpon_Calendar::PREFIX . '_http_s', 'http');
    5861            $this->token = get_option(EventUpon_Calendar::PREFIX . '_saved_search_id', '');
     62//            $this->event_api_url = self::$https_prefix."://" . self::EU_CALENDAR_BASE . "/services/rest.json?";
    5963            $this->event_api_url = "http://" . self::EU_CALENDAR_BASE . "/services/rest.json?";
    6064            /* require_once(sprintf("%s/add_event.php", dirname(__FILE__)));
     
    400404            delete_option(EventUpon_Calendar::PREFIX . '_header_text_color');
    401405            delete_option(EventUpon_Calendar::PREFIX . '_view_mode');
     406            delete_option(EventUpon_Calendar::PREFIX . '_http_s');
    402407            delete_option(EventUpon_Calendar::PREFIX . '_saved_search_id');
    403408            delete_option(EventUpon_Calendar::PREFIX . '_url');
     
    427432            $colorHeaderText = get_option(EventUpon_Calendar::PREFIX . '_header_text_color', '#000000');
    428433            $cssFile = get_option(EventUpon_Calendar::PREFIX . '_css_file', '');
    429             $url = get_option(EventUpon_Calendar::PREFIX . '_url', '//' . self::EU_CALENDAR_BASE . '/embed/calendar');
     434            $url = preg_replace('/^http(s)?/i' , self::$https_prefix, get_option(EventUpon_Calendar::PREFIX . '_url', '//' . self::EU_CALENDAR_BASE . '/embed/calendar') );
    430435            $activateLinks = get_option(EventUpon_Calendar::PREFIX . '_activate_links', 0);
    431436
  • eventupon-calendar/trunk/readme.txt

    r1392872 r1393770  
    114114== Changelog ==
    115115
     116= 1.4.2 =
     117
     118Setting added for http or https.
     119Updated readme.txt
     120
    116121= 1.4.1 =
    117122
  • eventupon-calendar/trunk/settings.php

    r1392872 r1393770  
    1717                EventUpon_Calendar::PREFIX . '_height' => '1700px',
    1818                EventUpon_Calendar::PREFIX . '_view_mode' => 'agenda',
     19                EventUpon_Calendar::PREFIX . '_http_s' => 'https',
    1920                EventUpon_Calendar::PREFIX . '_url' => '//' . EventUpon_Calendar::EU_CALENDAR_BASE . '/embed/calendar',
    2021                EventUpon_Calendar::PREFIX . '_background_color' => '#FFFFFF',
     
    4849            register_setting(EventUpon_Calendar::PREFIX . '-group', EventUpon_Calendar::PREFIX . '_header_text_color');
    4950            register_setting(EventUpon_Calendar::PREFIX . '-group', EventUpon_Calendar::PREFIX . '_view_mode');
     51            register_setting(EventUpon_Calendar::PREFIX . '-group', EventUpon_Calendar::PREFIX . '_http_s');
    5052            register_setting(EventUpon_Calendar::PREFIX . '-group', EventUpon_Calendar::PREFIX . '_saved_search_id');
    5153            register_setting(EventUpon_Calendar::PREFIX . '-group', EventUpon_Calendar::PREFIX . '_activate_links');
     
    9698                    'field' => EventUpon_Calendar::PREFIX . '_view_mode',
    9799                    'options' => array('discovery' => 'Discovery', 'week' => 'Week', 'month' => 'Month', 'agenda' => 'Agenda'),
     100                )
     101            );
     102
     103            add_settings_field(
     104                EventUpon_Calendar::PREFIX . '-calendar_http_s',
     105                'URL Prefix (HTTPS/HTTP)',
     106                array(&$this, 'settings_field_select'),
     107                EventUpon_Calendar::PREFIX . '_general',
     108                EventUpon_Calendar::PREFIX . '-section',
     109                array(
     110                    'field' => EventUpon_Calendar::PREFIX . '_http_s',
     111                    'options' => array('http' => 'HTTP', 'https' => 'HTTPS'),
    98112                )
    99113            );
Note: See TracChangeset for help on using the changeset viewer.