Plugin Directory

Changeset 3091077

Timestamp:
05/22/2024 05:55:07 PM (3 months ago)
Author:
room34
Message:

Version 11.1.0-beta-2

Location:
ics-calendar
Files:
144 added
13 edited

Legend:

Unmodified
Added
Removed
  • ics-calendar/trunk/assets/admin-script.js

    r2867441 r3091077  
    44jQuery(function() {
    55
    6     // Interactive tabs on admin documentation screen
    7     // Make sure we're on the ICS Calendar admin page so we don't break other plugins' admin pages
    8     if (jQuery('.wrap.r34ics').length > 0 && jQuery('a[href^="#"]').length > 0) {
    9         jQuery('a[href^="#"]').click(function(e) {
    10             e.stopPropagation();
    11             var hash = jQuery(this).attr('href').substring(jQuery(this).attr('href').indexOf('#'));
    12             jQuery('.column-1 .postbox').hide();
    13             jQuery(hash).show();
    14             jQuery('.column-1 .nav-tab').removeClass('nav-tab-active');
    15             jQuery('.column-1 .nav-tab[href="' + hash + '"').addClass('nav-tab-active');
    16             jQuery('html, body').animate({ scrollTop: 0 }, 500);
    17             // Update address bar
    18             if (history.pushState) {
    19                 window.history.pushState({}, document.title, hash);
    20             }
    21             return false;
    22         });
    23         if (location.href.indexOf('#') > -1) {
    24             var hash = location.href.substring(location.href.indexOf('#'));
    25             jQuery('a[href="' + hash + '"]').trigger('click');
     6    // Admin page tabbed navigation
     7    jQuery('.r34ics-menu a').on('click', function() {
     8        jQuery(jQuery(this).attr('href')).attr('data-current', 'current').siblings().removeAttr('data-current');
     9        jQuery(this).attr('data-current', 'current').parent().siblings().find('a').removeAttr('data-current');
     10        if (history.pushState) {
     11            window.history.pushState({}, document.title, jQuery(this).attr('href'));
    2612        }
    27     }
    28 
     13        return false;
     14    });
     15   
    2916    // Admin "Add ICS Calendar" button
    3017    jQuery('#poststuff').on('click', '.add_r34ics', function() { // Delegate event for editors with delayed initialization (e.g. ACF)
     
    8673
    8774});
     75
     76
     77
     78
     79
     80
     81
     82
     83
     84
     85
     86
     87
  • ics-calendar/trunk/assets/admin-script.min.js

    r2868405 r3091077  
    1 /*! ICS Calendar admin scripts https://icscalendar.com */ jQuery(function(){jQuery(".wrap.r34ics").length>0&&jQuery('a[href^="#"]').length>0&&(jQuery('a[href^="#"]').click(function(r){r.stopPropagation();var i=jQuery(this).attr("href").substring(jQuery(this).attr("href").indexOf("#"));return jQuery(".column-1 .postbox").hide(),jQuery(i).show(),jQuery(".column-1 .nav-tab").removeClass("nav-tab-active"),jQuery('.column-1 .nav-tab[href="'+i+'"').addClass("nav-tab-active"),jQuery("html, body").animate({scrollTop:0},500),history.pushState&&window.history.pushState({},document.title,i),!1}),location.href.indexOf("#")>-1)&&jQuery('a[href="'+location.href.substring(location.href.indexOf("#"))+'"]').trigger("click"),jQuery("#poststuff").on("click",".add_r34ics",function(){jQuery("#insert_r34ics").addClass("open")}),jQuery("#insert_r34ics_close, #insert_r34ics_overlay").on("click",function(){jQuery("#insert_r34ics").removeClass("open")}),jQuery("#insert_r34ics_form").on("submit",function(){if(jQuery(this).hasClass("saved_calendar"))return!1;if(""==jQuery("#insert_r34ics_url").val()&&0==jQuery("#insert_r34ics_id").length||""==jQuery("#insert_r34ics_id").val())return alert("ICS Subscribe URL is required."),jQuery("#insert_r34ics_url").focus(),!1;var r='[ics_calendar url="'+jQuery("#insert_r34ics_url").val().replace('"',"")+'"';return""!=jQuery("#insert_r34ics_title").val()&&(r+=' title="'+jQuery("#insert_r34ics_title").val().replace('"',"")+'"'),""!=jQuery("#insert_r34ics_description").val()&&(r+=' description="'+jQuery("#insert_r34ics_description").val().replace('"',"")+'"'),""!=jQuery("#insert_r34ics_view").val()&&(r+=' view="'+jQuery("#insert_r34ics_view").val().replace('"',"")+'"'),"list"==jQuery("#insert_r34ics_view").val()&&parseInt(jQuery("#insert_r34ics_count").val())>0&&(r+=' count="'+parseInt(jQuery("#insert_r34ics_count").val())+'"'),"list"==jQuery("#insert_r34ics_view").val()&&""!=jQuery("#insert_r34ics_format").val()&&(r+=' format="'+jQuery("#insert_r34ics_format").val().replace('"',"")+'"'),!0==jQuery("#insert_r34ics_eventdesc").prop("checked")&&(r+=' eventdesc="true"'),!0==jQuery("#insert_r34ics_location").prop("checked")&&(r+=' location="true"'),!0==jQuery("#insert_r34ics_organizer").prop("checked")&&(r+=' organizer="true"'),r+="]",window.send_to_editor(r),jQuery("#insert_r34ics_form")[0].reset(),jQuery("#r34ics_list_view_options").hide(),jQuery("#insert_r34ics").removeClass("open"),!1})});
     1/*! ICS Calendar admin scripts https://icscalendar.com */ jQuery(function(){jQuery(".)});
  • ics-calendar/trunk/assets/admin-style.css

    r3087274 r3091077  
    152152    color: #191919;
    153153    font-family: monospace;
    154     height: clamp(5rem, 25vh, 15rem);
     154    height: clamp(5rem, 5rem);
    155155    margin: 1em 0;
    156156    overflow: auto;
     
    191191}
    192192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
     232
    193233/* Place field help into "bugs" */
    194234.wrap.r34ics .description {
     
    204244        display: block;
    205245        height: 1.5em;
    206         position: absolute; top: 0.1em; left: 0.5em;
     246        position: absolute; top: 0.em; left: 0.5em;
    207247        width: 1.5em;
    208248    }
  • ics-calendar/trunk/assets/admin-style.min.css

    r3087274 r3091077  
    1 /*! ICS Calendar admin styles https://icscalendar.com */#insert_r34ics,#insert_r34ics_overlay{position:fixed;top:0;bottom:0;left:0;right:0}.r34ics mark.alert,.r34ics mark.error{color:var(--r34ics--color--orangered)}.r34ics{--r34ics--color--ics-red:#dc143c;--r34ics--color--ics-purple:#312a85;--r34ics--color--white:#ffffff;--r34ics--color--whitesmoke:#f0f3f6;--r34ics--color--gainsboro:#d9dcdf;--r34ics--color--darkgray:#a3a8ac;--r34ics--color--gray:#70787f;--r34ics--color--dimgray:#60686f;--r34ics--color--black:#10181f;--r34ics--color--dodgerblue:dodgerblue;--r34ics--color--gold:gold;--r34ics--color--lemonchiffon:lemonchiffon;--r34ics--color--limegreen:limegreen;--r34ics--color--orangered:orangered;--r34ics--color--trans10:rgba(105,105,105,0.1);--r34ics--color--trans20:rgba(105,105,105,0.2);--r34ics--color--trans30:rgba(105,105,105,0.3);--r34ics--color--trans40:rgba(105,105,105,0.4);--r34ics--color--trans50:rgba(105,105,105,0.5);--r34ics--color--trans60:rgba(105,105,105,0.6);--r34ics--color--trans70:rgba(105,105,105,0.7);--r34ics--color--trans80:rgba(105,105,105,0.8);--r34ics--color--trans90:rgba(105,105,105,0.9)}.notice.r34ics-admin-notice{align-items:center;background:url('ics-calendar-icon-2023.svg') left 16px center/64px no-repeat #fff;display:flex;min-height:88px;padding-left:96px}.r34ics .code-sample,.r34ics .diagnostics-window{background:#f7f7f7;margin:1em 0;overflow:auto;white-space:pre}.r34ics h4 code{font-weight:400}.r34ics .code-sample{border:1px solid #ddd;color:#093;font-family:monospace;font-size:85%;padding:.25em .5em;width:95%}.r34ics .columns-2{align-items:flex-start;display:flex;flex-direction:row;gap:3rem;width:100%}.r34ics .columns-2 .column-1{flex:0 0 calc(100% - 280px - 3rem)}.r34ics .columns-2 .column-2{flex:0 0 280px}.r34ics_media_icon{background-position:center center;background-repeat:no-repeat;background-size:16px auto;float:left;height:16px;margin:0;text-align:left;width:20px;padding-top:4px}.r34ics_media_icon:before{color:#82878c;content:"\f508";font:18px/1 dashicons;padding:0;transition:.1s ease-in-out}#insert_r34ics{display:none;overflow:auto;z-index:100050}#insert_r34ics.open,.wrap.r34ics .description .r34ics-help:hover .help_content{display:block}#insert_r34ics_overlay{background:#000;display:block;opacity:.7}#insert_r34ics_window{background:#fff;box-shadow:1px 1px 5px #000;min-height:10rem;min-width:240px;padding:0;position:absolute;top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}#insert_r34ics_header{border-bottom:1px solid #999;font-size:125%;height:44px;line-height:44px;padding:0 50px 0 1.5em;position:absolute;top:0;right:0;bottom:auto;left:0}#insert_r34ics_close{cursor:pointer;font-size:36px;height:44px;line-height:40px;position:absolute;top:0;right:0;bottom:auto;left:auto;text-align:center;width:44px}#insert_r34ics_content{margin-top:44px;min-width:280px!important;padding:1.5em;position:relative}#insert_r34ics_toggle_wrapper{display:none}.r34ics .diagnostics-window{border:1px solid #c3c4c7;border-radius:0;color:#191919;font-family:monospace;height:clamp(5rem,25vh,15rem);padding:.5em;width:calc(100% - 2px)}.r34ics hr{margin:1.5rem 0}.r34ics mark.alert{background-color:var(--r34ics--color--lemonchiffon);border:1px solid rgba(0,0,0,.15);display:block;font-weight:700;padding:2px 5px}.r34ics mark.error,.r34ics mark.info,.r34ics mark.success{background-color:transparent;font-weight:700}.r34ics mark.info{color:var(--r34ics--color--dodgerblue)}.r34ics mark.success{color:var(--r34ics--color--limegreen)}.wrap.r34ics .description{display:inline-block;margin:0;position:relative;vertical-align:top;width:auto}.wrap.r34ics .description .r34ics-help{cursor:help;display:block;height:1.5em;position:absolute;top:.1em;left:.5em;width:1.5em}.wrap.r34ics .description .r34ics-help:before{background:#0985f2;border-radius:2em;color:#fff;content:'?';display:inline-block;font-style:normal;font-weight:700;height:1.5em;line-height:1.5em;position:absolute;top:0;left:0;text-align:center;width:1.5em}.wrap.r34ics .description .r34ics-help .help_content{background:#fff;border:1px solid #ccd0d4;color:#444;display:none;font-style:normal;padding:.75em;position:absolute;top:.75em;left:0;text-align:left;width:20em;z-index:2}.wrap.r34ics .description .r34ics-help:hover .help_content code{display:inline-block!important;font-size:90%!important;padding:1px 2px!important}@media screen and (max-width:782px){.r34ics .columns-2{display:block}.r34ics .columns-2 .column-1{display:block;padding-right:0;width:100%}.r34ics .columns-2 .column-2{display:block;width:100%}}
     1/*! ICS Calendar admin styles https://icscalendar.com */#insert_r34ics,#insert_r34ics_overlay{position:fixed;top:0;bottom:0;left:0;right:0}.r34ics mark.alert,.r34ics mark.error{color:var(--r34ics--color--orangered)}.r34ics{--r34ics--color--ics-red:#dc143c;--r34ics--color--ics-purple:#312a85;--r34ics--color--white:#ffffff;--r34ics--color--whitesmoke:#f0f3f6;--r34ics--color--gainsboro:#d9dcdf;--r34ics--color--darkgray:#a3a8ac;--r34ics--color--gray:#70787f;--r34ics--color--dimgray:#60686f;--r34ics--color--black:#10181f;--r34ics--color--dodgerblue:dodgerblue;--r34ics--color--gold:gold;--r34ics--color--lemonchiffon:lemonchiffon;--r34ics--color--limegreen:limegreen;--r34ics--color--orangered:orangered;--r34ics--color--trans10:rgba(105,105,105,0.1);--r34ics--color--trans20:rgba(105,105,105,0.2);--r34ics--color--trans30:rgba(105,105,105,0.3);--r34ics--color--trans40:rgba(105,105,105,0.4);--r34ics--color--trans50:rgba(105,105,105,0.5);--r34ics--color--trans60:rgba(105,105,105,0.6);--r34ics--color--trans70:rgba(105,105,105,0.7);--r34ics--color--trans80:rgba(105,105,105,0.8);--r34ics--color--trans90:rgba(105,105,105,0.9)}.notice.r34ics-admin-notice{align-items:center;background:url('ics-calendar-icon-2023.svg') left 16px center/64px no-repeat #fff;display:flex;min-height:88px;padding-left:96px}.r34ics .code-sample,.r34ics .diagnostics-window{background:#f7f7f7;margin:1em 0;overflow:auto;white-space:pre}.r34ics h4 code{font-weight:400}.r34ics .code-sample{border:1px solid #ddd;color:#093;font-family:monospace;font-size:85%;padding:.25em .5em;width:95%}.r34ics .columns-2{align-items:flex-start;display:flex;flex-direction:row;gap:3rem;width:100%}.r34ics .columns-2 .column-1{flex:0 0 calc(100% - 280px - 3rem)}.r34ics .columns-2 .column-2{flex:0 0 280px}.r34ics_media_icon{background-position:center center;background-repeat:no-repeat;background-size:16px auto;float:left;height:16px;margin:0;text-align:left;width:20px;padding-top:4px}.r34ics_media_icon:before{color:#82878c;content:"\f508";font:18px/1 dashicons;padding:0;transition:.1s ease-in-out}#insert_r34ics{display:none;overflow:auto;z-index:100050}#insert_r34ics.open,.wrap.r34ics .description .r34ics-help:hover .help_content{display:block}#insert_r34ics_overlay{background:#000;display:block;opacity:.7}#insert_r34ics_window{background:#fff;box-shadow:1px 1px 5px #000;min-height:10rem;min-width:240px;padding:0;position:absolute;top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}#insert_r34ics_header{border-bottom:1px solid #999;font-size:125%;height:44px;line-height:44px;padding:0 50px 0 1.5em;position:absolute;top:0;right:0;bottom:auto;left:0}#insert_r34ics_close{cursor:pointer;font-size:36px;height:44px;line-height:40px;position:absolute;top:0;right:0;bottom:auto;left:auto;text-align:center;width:44px}#insert_r34ics_content{margin-top:44px;min-width:280px!important;padding:1.5em;position:relative}#insert_r34ics_toggle_wrapperem;left:.5em;width:1.5em}.wrap.r34ics .description .r34ics-help:before{background:#0985f2;border-radius:2em;color:#fff;content:'?';display:inline-block;font-style:normal;font-weight:700;height:1.5em;line-height:1.5em;position:absolute;top:0;left:0;text-align:center;width:1.5em}.wrap.r34ics .description .r34ics-help .help_content{background:#fff;border:1px solid #ccd0d4;color:#444;display:none;font-style:normal;padding:.75em;position:absolute;top:.75em;left:0;text-align:left;width:20em;z-index:2}.wrap.r34ics .description .r34ics-help:hover .help_content code{display:inline-block!important;font-size:90%!important;padding:1px 2px!important}@media screen and (max-width:782px){.r34ics .columns-2{display:block}.r34ics .columns-2 .column-1{display:block;padding-right:0;width:100%}.r34ics .columns-2 .column-2{display:block;width:100%}}
  • ics-calendar/trunk/assets/script.js

    r3080533 r3091077  
    1414
    1515function r34ics_ajax_request(r34ics_elem, failures) {
     16
    1617    r34ics_elem.addClass('loading');
    1718    if (typeof failures == 'undefined') { failures = 0; }
     
    4243                    console.log('ICS Calendar AJAX request succeeded for element #' + r34ics_elem.attr('id'));
    4344                }
    44                 r34ics_elem.replaceWith(data);
     45                r34ics_elem.html(data);
     46                r34ics_elem.removeClass('loading');
    4547                r34ics_init();
    4648                // @todo Move to hook
     
    634636    if (jQuery(document).find('.r34ics-ajax-container').length > 0) {
    635637        r34ics_ajax_init();
     638
    636639    }
    637640
  • ics-calendar/trunk/assets/script.min.js

    r3080533 r3091077  
    1 /*! ICS Calendar front end scripts https://icscalendar.com */ function r34ics_ajax_init(){jQuery(document).trigger("r34ics_ajax_start"),jQuery(document).find(".r34ics-ajax-container").each(function(){r34ics_ajax_request(jQuery(this),0)}),jQuery(document).trigger("r34ics_ajax_end")}function r34ics_ajax_request(e,a){e.addClass("loading"),void 0===a&&(a=0),jQuery.ajax({url:r34ics_ajax_obj.ajaxurl,data:{action:"r34ics_ajax",r34ics_nonce:r34ics_ajax_obj.r34ics_nonce,subaction:"display_calendar",args:e.data("args")},dataType:"text",type:"POST",success:function(t){"1"==t?a<=5?r34ics_ajax_request(e,++a):console.error("ICS Calendar AJAX request failed for element #"+e.attr("id")):(""!=typeof e.data("args").debug&&parseInt(e.data("args").debug)>0&&console.log("ICS Calendar AJAX request succeeded for element #"+e.attr("id")),e.replaceWith(t),r34ics_init(),"function"==typeof r34icspro_init&&r34icspro_init(),r34ics_show_hide_headers())},error:function(e){console.error(e)}})}function r34ics_boolean_check(e){var a=String(e).trim().toLowerCase();return"1"===a||"true"===a||"on"===a?1:"0"===a||"false"===a||"off"===a||"none"===a?0:"null"===a||""===a?null:parseInt(e)>0}function r34ics_init(){if(jQuery(document).trigger("r34ics_init_start"),jQuery(".ics-calendar").animate({opacity:1},500),r34ics_is_phone()&&jQuery("body").addClass("r34ics_phone"),jQuery(document).on("click",".r34ics_event_ics_download",function(){if(""!=jQuery(this).data("eventdl-uid")){var e=jQuery(this).data("eventdl-uid"),a=jQuery(this).data("eventdl-feed-key"),t=jQuery(this).closest("form");0==t.length&&jQuery("form.r34ics_event_ics_download_form").each(function(){jQuery(this).find('*[data-eventdl-uid="'+e+'"]').length>0&&(t=jQuery(this))}),t.length>0&&(t.find('input[name="r34ics-feed-key"]').val(a),t.find('input[name="r34ics-uid"]').val(e),t.submit())}return!1}),jQuery(document).on("change",".ics-calendar-select",function(){r34ics_show_hide_headers()}),jQuery(document).on("keypress",".ics-calendar *, .r34ics_lightbox *",function(e){13==e.which&&(jQuery(this).trigger("click"),jQuery(this).hasClass("ics-calendar-paginate")&&jQuery(this).hasClass("prev")?jQuery(document).find(".ics-calendar-paginate.prev:visible").focus():jQuery(this).hasClass("ics-calendar-paginate")&&jQuery(this).hasClass("next")&&jQuery(document).find(".ics-calendar-paginate.next:visible").focus())}),jQuery("details").on("toggle",function(){jQuery(this).has(".ics-calendar")&&r34ics_show_hide_headers()}),jQuery(document).on("click",".ics-calendar.r34ics_toggle .event, .ics-calendar.toggle .event, .ics-calendar.r34ics_toggle .event .title, .ics-calendar.toggle .event .title",function(e){e.stopPropagation();var a=jQuery(this).hasClass("title")?jQuery(this).parent():jQuery(this);if(0==a.find(".descloc").length)return!1;jQuery(".r34ics_lightbox").length>0&&a.closest(".ics-calendar").hasClass("r34ics_toggle_lightbox")?(jQuery(".r34ics_lightbox .r34ics_lightbox_content").html(a.find(".descloc").html()),jQuery(".r34ics_lightbox").addClass("open"),jQuery(".r34ics_lightbox_close").focus()):a.hasClass("open")?a.removeClass("open"):a.addClass("open")}),jQuery(document).on("click",".ics-calendar.r34ics_toggle .event a, .ics-calendar.toggle .event a, .r34ics_lightbox .r34ics_lightbox_content",function(e){e.stopPropagation()}),jQuery(".r34ics_lightbox").length>0){if(jQuery(".r34ics_lightbox").length>1){var e=0;jQuery(".r34ics_lightbox").each(function(){e>0&&jQuery(this).remove(),e++})}jQuery(".r34ics_lightbox").prependTo("body"),jQuery(".r34ics_lightbox .r34ics_lightbox_close").on("click",function(){jQuery(".r34ics_lightbox .r34ics_lightbox_content").html(""),jQuery(".r34ics_lightbox").removeClass("open")})}if(jQuery(".ics-calendar:not(.sametab) a").each(function(){"_blank"==jQuery(this).attr("target")?jQuery(this).addClass("offsite-link"):void 0!==jQuery(this).attr("href")&&0==jQuery(this).attr("href").indexOf("http")&&-1==jQuery(this).attr("href").indexOf("//"+location.hostname)&&jQuery(this).addClass("offsite-link").attr("target","_blank")}),jQuery(".ics-calendar-color-key-toggle").on("click",function(){var e=jQuery(this).closest(".ics-calendar"),a=jQuery(this).attr("data-feed-key");if(!0==jQuery(this).prop("checked")?e.find(".event[data-feed-key="+parseInt(a)+"], .events *[data-feed-key="+parseInt(a)+"]").removeClass("hidden_in_main"):e.find(".event[data-feed-key="+parseInt(a)+"], .events *[data-feed-key="+parseInt(a)+"]").addClass("hidden_in_main"),r34ics_show_hide_headers("#"+e.attr("id")),jQuery(this).prop("checked")){var t=!0;jQuery(this).parent().parent().siblings().find(".ics-calendar-color-key-toggle").each(function(){jQuery(this).prop("checked")||(t=!1)}),t&&jQuery(this).parent().parent().siblings().find(".ics-calendar-color-key-toggle-all").each(function(){jQuery(this).prop("checked",!0)})}else jQuery(this).parent().parent().siblings().find(".ics-calendar-color-key-toggle-all").each(function(){jQuery(this).prop("checked",!1)})}),jQuery(".ics-calendar-color-key-toggle-all").on("click",function(){jQuery(this).prop("checked")?jQuery(this).parent().parent().siblings().find(".ics-calendar-color-key-toggle").each(function(){jQuery(this).prop("checked")||jQuery(this).trigger("click")}):jQuery(this).parent().parent().siblings().find(".ics-calendar-color-key-toggle").each(function(){jQuery(this).prop("checked")&&jQuery(this).trigger("click")})}),jQuery(".ics-calendar.layout-week").length>0&&(jQuery(".ics-calendar.layout-week .ics-calendar-select").on("change",function(){var e=jQuery(this).closest(".ics-calendar");e.addClass("show-past-events"),e.find(".ics-calendar-month-grid tbody tr").css("display","none"),r34ics_is_phone()&&!e.hasClass("nomobile")?e.find(".ics-calendar-month-grid tbody tr."+jQuery(this).val()).css("display","block"):e.find(".ics-calendar-month-grid tbody tr."+jQuery(this).val()).css("display","table-row")}),jQuery('a[data-ics-calendar-action="show-past-events"]').on("click",function(){var e=jQuery(this).closest(".ics-calendar");return e.hasClass("show-past-events")?(e.removeClass("show-past-events"),jQuery(this).text(ics_calendar_i18n.show_past_events)):(e.addClass("show-past-events"),jQuery(this).remove()),r34ics_show_hide_headers(),!1}),jQuery(".ics-calendar.layout-week .ics-calendar-month-grid:not(.fixed_dates) tbody tr").addClass("remove"),jQuery(".ics-calendar.layout-week .ics-calendar-month-grid.fixed_dates tbody tr").addClass("current-week"),jQuery(".ics-calendar.layout-week .ics-calendar-month-grid:not(.fixed_dates) tbody td.today").parent().addClass("current-week").removeClass("remove"),jQuery(".ics-calendar.layout-week .ics-calendar-month-grid:not(.fixed_dates) tbody td.today").parent().prev().addClass("previous-week").removeClass("remove"),jQuery(".ics-calendar.layout-week .ics-calendar-month-grid:not(.fixed_dates) tbody td.today").parent().next().addClass("next-week").removeClass("remove"),jQuery(".ics-calendar.layout-week .ics-calendar-month-grid:not(.fixed_dates) tbody tr.remove").remove(),r34ics_week_reset(),jQuery(".ics-calendar.layout-week .ics-calendar-select").show(),jQuery(".ics-calendar.layout-week .ics-calendar-week-wrapper:first-of-type").show(),jQuery(".ics-calendar:not(.month_list_all).layout-week").each(function(){0==jQuery(this).find(".ics-calendar-week-wrapper:visible .past:not(.empty)").length&&jQuery(this).find(".ics-calendar-past-events-toggle").remove()})),jQuery(".ics-calendar.layout-list").length>0&&jQuery(".ics-calendar.layout-list .descloc_toggle_excerpt").on("click",function(){jQuery(this).hide().siblings(".descloc_toggle_full").show()}),jQuery(".ics-calendar.layout-list .ics-calendar-pagination, .ics-calendar.layout-basic .ics-calendar-pagination").length>0&&(jQuery(".ics-calendar-paginate").on("click",function(){var e,a,t=jQuery(this).closest(".ics-calendar"),i=t.find(".ics-calendar-pagination:visible"),s=jQuery(this).hasClass("prev")?"prev":"next";return t.find(".ics-calendar-paginate").show(),a="prev"===s?(e=i.prev()).prev():(e=i.next()).next(),0!=e.length&&(i.hide(),e.show()),0==a.length&&t.find(".ics-calendar-paginate."+s).hide(),r34ics_show_hide_headers(),!1}),jQuery(".ics-calendar.layout-list, .ics-calendar.layout-basic").each(function(){jQuery(this).find(".ics-calendar-pagination:not(:first-child)").hide(),jQuery(this).find(".ics-calendar-paginate.prev").hide(),0==jQuery(this).find('.ics-calendar-pagination[data-rel2today="today"]').length&&jQuery(this).find('.ics-calendar-pagination[data-rel2today="past"]').last().attr("data-rel2today","today");var e=jQuery(this).find('.ics-calendar-pagination[data-rel2today="today"]');void 0!==e.data("page")&&0!=e.data("page")&&(jQuery(this).find(".ics-calendar-pagination:first-child").hide(),e.show(),jQuery(".ics-calendar-paginate.prev").show())}),r34ics_show_hide_headers()),jQuery(".ics-calendar.layout-month").length>0){jQuery(".ics-calendar.layout-month .ics-calendar-select").on("change",function(){var e=jQuery(this).closest(".ics-calendar");e.find(".ics-calendar-month-wrapper").hide(),e.find('.ics-calendar-month-wrapper[data-year-month="'+jQuery(this).val()+'"]').show(),jQuery(this).closest(".ics-calendar.layout-month").hasClass("stickymonths")&&r34ics_qs_update("r34icsym",jQuery(this).val(),jQuery(this).val()==jQuery(this).data("this-month"));var a=e.find(".ics-calendar-arrow-nav");if(a.length>0){var t=jQuery(this).find("option:selected").prev();t.length>0?(a.find(".prev").data("goto",t.attr("value")).removeClass("inactive").removeAttr("aria-hidden"),a.find(".prev-text").text(t.text())):(a.find(".prev").data("goto","").addClass("inactive").attr("aria-hidden","true"),a.find(".prev-text").text(""));var i=jQuery(this).find("option:selected").next();i.length>0?(a.find(".next").data("goto",i.attr("value")).removeClass("inactive").removeAttr("aria-hidden"),a.find(".next-text").text(i.text())):(a.find(".next").data("goto","").addClass("inactive").attr("aria-hidden","true"),a.find(".next-text").text("")),jQuery(this).find("option:selected").val()!=a.find(".today").data("goto")?a.find(".today").removeClass("inactive").removeAttr("aria-hidden"):a.find(".today").addClass("inactive").attr("aria-hidden","true")}}),jQuery(".ics-calendar.layout-month .ics-calendar-arrow-nav > *").unbind().on("click",function(){return""!=jQuery(this).data("goto")&&jQuery(this).closest(".ics-calendar").find(".ics-calendar-select").val(jQuery(this).data("goto")).trigger("change"),!1}),jQuery('a[data-ics-calendar-action="show-past-events"]').on("click",function(){var e=jQuery(this).closest(".ics-calendar");return e.hasClass("show-past-events")?(e.removeClass("show-past-events"),jQuery(this).text(ics_calendar_i18n.show_past_events)):(e.addClass("show-past-events"),jQuery(this).text(ics_calendar_i18n.hide_past_events)),r34ics_show_hide_headers(),!1}),jQuery(".ics-calendar-select").on("change",function(){var e=jQuery(this).closest(".ics-calendar");e.hasClass("month_list_all")?e.find('a[data-ics-calendar-action="show-past-events"]').show():jQuery(this).val()==jQuery(this).attr("data-this-month")?e.find('a[data-ics-calendar-action="show-past-events"]').show():e.find('a[data-ics-calendar-action="show-past-events"]').hide()}),jQuery(".ics-calendar.layout-month .ics-calendar-select:not(.hidden), .ics-calendar.layout-month .ics-calendar-arrow-nav").show(),jQuery('.ics-calendar.layout-month .ics-calendar-month-wrapper[data-year-month="'+jQuery(".ics-calendar-select").val()+'"]').show();var a=r34ics_qs_val("r34icsym");null!=a&&1==jQuery('.ics-calendar.layout-month .ics-calendar-select option[value="'+a+'"]').length?jQuery(".ics-calendar.layout-month .ics-calendar-select").val(a).trigger("change"):jQuery(".ics-calendar.layout-month .ics-calendar-select").trigger("change"),jQuery(".ics-calendar:not(.month_list_all).layout-month").each(function(){0==jQuery(this).find('.ics-calendar-month-wrapper[data-is-this-month="1"] .past:not(.empty)').length&&jQuery(this).find(".ics-calendar-past-events-toggle").remove()}),r34ics_maybe_skip_to_next_month()}jQuery(".r34ics_debug_toggle").on("click",function(){jQuery(".r34ics_debug_wrapper").hasClass("minimized")?jQuery(".r34ics_debug_wrapper").removeClass("minimized"):jQuery(".r34ics_debug_wrapper").addClass("minimized")}),jQuery(document).trigger("r34ics_init_end")}function r34ics_is_phone(){return window.innerWidth<=782}function r34ics_maybe_skip_to_next_month(){(r34ics_is_phone()||jQuery('.ics-calendar.layout-month[data-month-table-list-toggle="list"]').length>0)&&jQuery(".ics-calendar:not(.nomobile).layout-month").each(function(){if(jQuery(this).find(".ics-calendar-month-wrapper:visible").find(".no_events, .no_additional_events").length>0&&0==jQuery(this).find(".ics-calendar-month-wrapper:visible").next().find(".no_events").length){var e=jQuery(this).closest(".ics-calendar").find(".ics-calendar-select"),a=e.find("option[selected]").next().val();e.val(a).trigger("change")}})}function r34ics_phone_day_headers(){r34ics_is_phone()&&"undefined"!=typeof r34ics_days_of_week_map?jQuery(".ics-calendar-month-grid thead th").each(function(){var e=jQuery(this).text();void 0!==r34ics_days_of_week_map[e]&&(jQuery(this).data("orig-str",e),jQuery(this).text(r34ics_days_of_week_map[e]))}):jQuery(".ics-calendar-month-grid thead th").each(function(){""!=jQuery(this).data("orig-str")&&jQuery(this).text(jQuery(this).data("orig-str"))})}function r34ics_qs_update(e,a,t){if(history.pushState&&null!=a){var i,s;!0==t?-1!=location.search.indexOf(e+"=")&&(s=RegExp(e+"=[^&]*","g"),(i=location.search.replace(s,"")).lastIndexOf("&")==i.length-1&&(i=i.slice(0,-1))):""==location.search?i="?"+e+"="+a:-1!=location.search.indexOf(e+"=")?(s=RegExp(e+"=[^&]*","g"),i=location.search.replace(s,e+"="+a)):i=location.search.lastIndexOf("&")==location.search.length-1?location.search+e+"="+a:location.search+"&"+e+"="+a,window.history.pushState({},document.title,i)}}function r34ics_qs_val(e){var a,t,i=location.search.replace("?","").split("&"),s=[];for(t=0;t<i.length;t++)s[(a=i[t].split("="))[0]]=a[1];return jQuery("<div>").text(s[e]).html()}function r34ics_show_hide_headers(e){(void 0===e||null==e)&&(e=".ics-calendar"),jQuery(e+" .ics-calendar-list-wrapper .ics-calendar-date, "+e+":not(.monthnav-compact) .ics-calendar-label, "+e+" .ics-calendar-month-grid .day").show().removeClass("nomobile").removeClass("hidden_in_list"),jQuery(".ics-calendar.layout-list").length>0&&(jQuery(e+" .ics-calendar-list-wrapper .ics-calendar-date").each(function(){0==jQuery(this).next("dl").find(".event:visible").length?jQuery(this).hide():jQuery(this).show()}),jQuery(e+" .ics-calendar-list-wrapper .ics-calendar-label").each(function(){0==jQuery(this).siblings(".ics-calendar-date-wrapper").children(".ics-calendar-date:visible").length?jQuery(this).hide():jQuery(this).show()})),(jQuery("body.r34ics_phone .ics-calendar.layout-month").length>0||"list"==jQuery(e).data("month-table-list-toggle"))&&(jQuery(e+" .ics-calendar-month-grid .events").each(function(){0==jQuery(this).find(".event:visible").length?jQuery(this).siblings(".day").addClass("nomobile").addClass("hidden_in_list"):jQuery(this).siblings(".day").removeClass("nomobile").removeClass("hidden_in_list")}),jQuery(e+" .ics-calendar-month-wrapper .ics-calendar-month-grid").each(function(){0==jQuery(this).find(".event:visible").length?jQuery(this).siblings(".ics-calendar-label").addClass("nomobile").addClass("hidden_in_list"):jQuery(this).siblings(".ics-calendar-label").removeClass("nomobile").removeClass("hidden_in_list")}))}function r34ics_week_reset(){jQuery(".ics-calendar.layout-week").length>0&&(jQuery("body.r34ics_phone .ics-calendar.layout-week:not(.nomobile) .ics-calendar-month-grid tbody tr.current-week").css("display","block"),jQuery("body.r34ics_phone .ics-calendar.layout-week.nomobile .ics-calendar-month-grid tbody tr.current-week, body:not(.r34ics_phone) .ics-calendar.layout-week .ics-calendar-month-grid tbody tr.current-week").css("display","table-row"))}jQuery(window).on("load",function(){jQuery(".ics-calendar").length>0&&r34ics_init(),r34ics_show_hide_headers(),r34ics_phone_day_headers(),jQuery(".ics-calendar").not(":visible").length>0&&jQuery("body *").on("click",function(){jQuery(".ics-calendar").filter(":visible").length>0&&r34ics_show_hide_headers()}),jQuery(document).find(".r34ics-ajax-container").length>0&&r34ics_ajax_init()}),jQuery(window).on("resize",function(){r34ics_is_phone()?jQuery("body").addClass("r34ics_phone"):jQuery("body").removeClass("r34ics_phone"),r34ics_show_hide_headers(),r34ics_phone_day_headers(),r34ics_maybe_skip_to_next_month(),r34ics_week_reset()}),jQuery(document).on("r34ics_init_end",function(){});
     1/*! ICS Calendar front end scripts https://icscalendar.com */ function r34ics_ajax_init(){jQuery(document).trigger("r34ics_ajax_start"),jQuery(document).find(".r34ics-ajax-container").each(function(){r34ics_ajax_request(jQuery(this),0)}),jQuery(document).trigger("r34ics_ajax_end")}function r34ics_ajax_request(e,a){e.)}),jQuery(window).on("resize",function(){r34ics_is_phone()?jQuery("body").addClass("r34ics_phone"):jQuery("body").removeClass("r34ics_phone"),r34ics_show_hide_headers(),r34ics_phone_day_headers(),r34ics_maybe_skip_to_next_month(),r34ics_week_reset()}),jQuery(document).on("r34ics_init_end",function(){});
  • ics-calendar/trunk/class-r34ics.php

    r3088508 r3091077  
    287287   
    288288        // Run utilities if applicable
    289         if (isset($_POST['r34ics-purge-calendar-transients-nonce']) && wp_verify_nonce($_POST['r34ics-purge-calendar-transients-nonce'], 'r34ics')) {
    290             $cleared = r34ics_purge_calendar_transients();
    291             if ($cleared > 0) {
    292                 ?>
    293                 <div class="notice notice-success">
    294                     <p><?php printf(__('Cleared %1$s %2$s transient(s).', 'r34ics'), intval($cleared), 'ICS Calendar'); ?></p>
    295                 </div>
    296                 <?php
    297             }
    298             else {
    299                 ?>
    300                 <div class="notice notice-warning">
    301                     <p><?php printf(__('No %1$s transients were found.', 'r34ics'), 'ICS Calendar'); ?></p>
    302                 </div>
    303                 <?php
    304             }
    305         }
     289        $this->_admin_page_callback_utilities();
    306290
    307291        // URL tester
    308         elseif (isset($_POST['r34ics-url-tester-nonce']) && wp_verify_nonce($_POST['r34ics-url-tester-nonce'],'r34ics')) {
    309        
    310             if ($url_to_test = filter_input(INPUT_POST, 'url_to_test', FILTER_SANITIZE_URL)) {
    311                 $url_tester_result = $this->_url_get_contents($url_to_test);
    312                 do_action('r34ics_url_tester_result_debug', $url_tester_result);
    313             }
    314        
    315         }
     292        $this->_admin_page_callback_url_tester();
    316293   
    317294        // Save admin settings
    318         elseif (current_user_can('manage_options') && isset($_POST['r34ics-admin-options-nonce']) && wp_verify_nonce($_POST['r34ics-admin-options-nonce'],'r34ics')) {
    319        
    320             // transients_expiration
    321             update_option('r34ics_transients_expiration', intval($_POST['transients_expiration']));
    322            
    323             // allowed_hosts
    324             // Need to allow $_POST['allowed_hosts'] to be empty for erasing existing entries
    325             if (function_exists('r34ics_sanitize_hosts')) {
    326                 update_option('r34ics_allowed_hosts', r34ics_sanitize_hosts($_POST['allowed_hosts']));
    327             }
    328            
    329             // display_add_calendar_button_false
    330             update_option('r34ics_display_add_calendar_button_false', !empty($_POST['display_add_calendar_button_false']));
    331        
    332             // url_get_contents_legacy_method
    333             update_option('r34ics_url_get_contents_legacy_method', !empty($_POST['url_get_contents_legacy_method']));
    334        
    335             // use_new_defaults_10_6
    336             update_option('r34ics_use_new_defaults_10_6', !empty($_POST['use_new_defaults_10_6']));
    337        
    338             // load_css_js_on_wp_enqueue_scripts (removed in 10.7.1)
    339             delete_option('r34ics_load_css_js_on_wp_enqueue_scripts');
    340            
    341             ?>
    342             <div class="notice notice-success">
    343                 <p><?php _e('Settings updated.', 'r34ics'); ?></p>
    344             </div>
    345             <?php
    346 
    347         }
     295        $this->_admin_page_callback_save_settings();
    348296
    349297        // Render template
     
    1036984        )) . ';');
    1037985        wp_add_inline_script('ics-calendar', 'var r34ics_days_of_week_map = ' . json_encode((array)$this->days_of_week_map()) . ';');
     986
     987
     988
     989
    1038990
    1039991        // ICS Calendar CSS
     
    15971549        // Assemble display arguments array
    15981550        $args = array(
    1599             'ajax' => r34ics_boolean_check($ajax),
     1551            'ajax' => ),
    16001552            'arrayonly' => r34ics_boolean_check($arrayonly),
    16011553            'attach' => (
     
    18431795    }
    18441796   
     1797
     1798
     1799
     1800
     1801
     1802
     1803
     1804
     1805
     1806
     1807
     1808
     1809
     1810
     1811
     1812
     1813
     1814
     1815
     1816
     1817
     1818
     1819
     1820
     1821
     1822
     1823
     1824
     1825
     1826
     1827
     1828
     1829
     1830
     1831
     1832
     1833
     1834
     1835
     1836
     1837
     1838
     1839
     1840
     1841
     1842
     1843
     1844
     1845
     1846
     1847
     1848
     1849
     1850
     1851
     1852
     1853
     1854
     1855
     1856
     1857
     1858
     1859
    18451860
    18461861    /**
     
    19121927        }
    19131928        return $events;
    1914     }
    1915 
    1916 
    1917     private function _get_version() {
    1918         if (!function_exists('get_plugin_data')) {
    1919             require_once(ABSPATH . 'wp-admin/includes/plugin.php');
    1920         }
    1921         $plugin_data = get_plugin_data(dirname(__FILE__) . '/ics-calendar.php');
    1922         return $plugin_data['Version'];
    19231929    }
    19241930
     
    20062012
    20072013
     2014
     2015
     2016
     2017
     2018
     2019
     2020
     2021
     2022
    20082023    protected function _load_parser($legacy=false) {
    20092024        if (!class_exists('R34ICS_ICal\ICal')) { include_once($legacy ? $this->ical_legacy_path : $this->ical_path); }
  • ics-calendar/trunk/ics-calendar.php

    r3088508 r3091077  
    44Plugin URI: https://icscalendar.com
    55Description: Turn your Google Calendar, Microsoft Office 365 or Apple iCloud Calendar into a seamlessly integrated, auto-updating, zero-maintenance WordPress experience.
    6 Version: 11.1.0-beta-1
     6Version: 11.1.0-beta-
    77Requires at least: 4.9
    88Requires PHP: 7.0
  • ics-calendar/trunk/readme.txt

    r3088508 r3091077  
    100100== Changelog ==
    101101
    102 = 11.1.0-beta-1 - 2024.05.17 =
    103 
    104 * Added new `hidecancelledevents` and `hidetentativeevents` shortcode parameters. These hide events with a `STATUS` value of `CANCELLED` or `TENTATIVE`, respectively.
    105 * Added fallback to get event URL from the URI property if it exists. The iCalendar spec includes a [URI](https://icalendar.org/iCalendar-RFC-5545/3-3-13-uri.html) property, but not a URL property. However in our practical experience the URL property is commonly used by calendar vendors.
    106 * Replaced several instances of null coalescing operators (`?? null`) with short ternary operators (`?: ''`) setting empty strings rather than null values for event properties. This should not produce any noticeable changes in most cases, but may occasionally allow for values to be returned that have been missing in the output under the old logic.
    107 * Updated the set of fields that are masked by the `maskinfo` parameter to account for changes in the ics-parser library.
     102= 11.1.0-beta-2 - 2024.05.22 =
     103
     104* AJAX:
     105  * Added new **Always use AJAX to render calendars** admin setting. This will automatically force all calendars on the site to render asynchronously using AJAX.
     106  * Restructured AJAX rendering and added a JavaScript interval to automatically refresh all AJAX-loaded calendars on the same frequency as the site's configured **Transient (cache) expiration** setting. (Minimum of 300 seconds.) Provides a way for pages containing calendars to be left open indefinitely (e.g. for kiosk displays) and receive updates.
     107* Parameters:
     108  * Added new `hidecancelledevents` and `hidetentativeevents` shortcode parameters. These hide events with a `STATUS` value of `CANCELLED` or `TENTATIVE`, respectively.
     109* Admin:
     110  * Redesigned admin screen with tabbed layout for improved usability, relabeled some elements, and updated links to User Guide documentation. Refactored associated code into discrete methods. Removed legacy JavaScript that was no longer in use.
     111* Miscellaneous:
     112  * Added fallback to get event URL from the URI property if it exists. The iCalendar spec includes a [URI](https://icalendar.org/iCalendar-RFC-5545/3-3-13-uri.html) property, but not a URL property. However in our practical experience the URL property is commonly used by calendar vendors.
     113  * Replaced several instances of null coalescing operators (`?? null`) with short ternary operators (`?: ''`) setting empty strings rather than null values for event properties. This should not produce any noticeable changes in most cases, but may occasionally allow for values to be returned that have been missing in the output under the old logic.
     114  * Updated the set of fields that are masked by the `maskinfo` parameter to account for changes in the ics-parser library.
    108115
    109116= 11.0.1.2 - 2024.05.15 =
  • ics-calendar/trunk/templates/admin/admin-options.php

    r3074711 r3091077  
    99    <span class="description"><small class="r34ics-help"><span class="help_content"><?php printf(__('If your calendar server is hosted on the same physical server as your website, is part of the same local network, or otherwise uses a %1$sreserved IP address%2$s, enter its hostname here to allow access. For multiple calendar servers, enter one hostname per line. See %3$sthe %4$s documentation%5$s for more information.', 'r34ics'), '<a href="https://en.wikipedia.org/wiki/Internet_Protocol_version_4#Special-use_addresses" target="_blank">', '</a>', '<a href="https://icscalendar.com/developer/#http_request_host_is_external" target="_blank">', 'ICS Calendar', '</a>'); ?></span></small></span><br />
    1010    <small><?php _e('Enter one hostname per line.', 'r34ics'); ?></small>
     11
     12
     13
     14
     15
    1116</p>
    1217
  • ics-calendar/trunk/templates/admin/admin.php

    r2864649 r3091077  
    1010   
    1111        <div class="column-1">
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
    1264           
    13             <div id="basic-shortcode-example">
    14 
    15                 <h3><?php _e('Basic Shortcode Example', 'r34ics'); ?></h3>
    16 
    17                 <p><?php printf(__('Use the following shortcode format in your page content where you would like your calendar to appear, inserting your ICS feed URL between the quotation marks. If you do not know your ICS feed URL, %1$shere&rsquo;s how to find it%2$s.', 'r34ics'), '<strong><a href="https://icscalendar.com/getting-started/#finding-your-ics-feed-url" target="_blank">', '</a></strong>'); ?></p>
    18 
    19                 <p><code>[ics_calendar url=&quot;&quot;]</code></p>
    20                        
    21                 <p><?php printf(__('Many additional customization options are available. Use our online %1$sShortcode Builder%2$s to easily create a customized shortcode, or consult the %3$sUser Guide%4$s for more information.', 'r34ics'), '<strong><a href="https://icscalendar.com/shortcode-builder/" target="_blank" style="white-space: nowrap;">', '</a></strong>', '<strong><a href="https://icscalendar.com/user-guide/" target="_blank" style="white-space: nowrap;">', '</a></strong>'); ?></p>
    2265            </div>
    23            
    24             <hr />
    25    
    26             <?php include_once(plugin_dir_path(__FILE__) . 'utilities.php'); ?>
    27 
    28             <?php
    29             if (current_user_can('manage_options')) {
    30                 ?>
    31                 <hr />
    32 
    33                 <div id="admin-options">
    34 
    35                     <h3><?php _e('Administrative Options', 'r34ics'); ?></h3>
    36 
    37                     <form id="r34ics-admin-options" method="post" action="">
    38                         <?php
    39                         wp_nonce_field('r34ics','r34ics-admin-options-nonce');
    40                    
    41                         include_once(plugin_dir_path(__FILE__) . 'admin-options.php');
    42                         ?>
    43 
    44                         <p><input type="submit" class="button button-primary" value="<?php echo esc_attr(__('Save Changes', 'r34ics')); ?>" /></p>
    45                     </form>
    46 
    47                 </div>
    48                 <?php
    49             }
    50             ?>
    5166   
    5267        </div>
  • ics-calendar/trunk/templates/admin/sidebar.php

    r3087274 r3091077  
    11<div class="postbox"><div class="inside">
    22
    3     <a href="https://icscalendar.com/" target="_blank"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?>assets/ics-calendar-logo-2023.svg" alt="ICS Calendar" style="display: block; height: auto; margin: 0 auto 1.5em auto; width: 200px;" /></a>
     3    <a href="https://icscalendar.com/" target="_blank"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?>assets/ics-calendar-logo-2023.svg" alt="ICS Calendar" style="display: block; height: auto; margin: 0 auto 1.5em auto; width: 0px;" /></a>
    44   
    55    <h3><?php _e('User Guide', 'r34ics'); ?></h3>
    66   
    7     <p><?php _e('Our complete user guide is available with full translation into dozens of languages on our website:', 'r34ics'); ?> <strong><a href="https://icscalendar.com/user-guide/">icscalendar.com/user-guide</a></strong></p>
     7    <p><?php _e('Our complete user guide is available with full translation into dozens of languages on our website:', 'r34ics'); ?><br />
     8    <strong><a href="https://icscalendar.com/user-guide/">icscalendar.com/user-guide</a></strong></p>
    89   
    910    <h3><?php _e('Support', 'r34ics'); ?></h3>
     
    2829<div class="postbox"><div class="inside">
    2930
    30     <a href="https://icscalendar.com/pro" target="_blank"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?>assets/ics-calendar-pro-logo-2023.svg" alt="ICS Calendar Pro" style="display: block; height: auto; margin: 1.5em auto; width: 200px;" /></a>
     31    <h3 style="text-align: center;"><?php _e('Do even more with...', 'r34icspro'); ?></h3>
     32
     33    <a href="https://icscalendar.com/pro" target="_blank"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?>assets/ics-calendar-pro-logo-2023.svg" alt="ICS Calendar Pro" style="display: block; height: auto; margin: 1.5em auto; width: 180px;" /></a>
    3134   
    32     <p><strong style="color: #0985f2;"><?php _e('Upgrade to PRO!', 'r34ics'); ?></strong><br />
    33     <?php printf(__('Features include additional views (Full, Masonry, Month with Sidebar, Widget, Year-at-a-Glance, and others), a Calendar Builder with save feature for full management of calendar settings without manually editing the shortcode, Customizer options to easily modify the calendar&rsquo;s appearance, advanced features like regular expressions, and more! Visit %s to learn more.', 'r34ics'), '<strong><a href="https://icscalendar.com/pro/" target="_blank">icscalendar.com/pro</a></strong>'); ?></p>
     35    <h4 style="margin-bottom: 0;"><?php _e('Additional Views', 'r34icspro'); ?></h4>
     36    <p style="margin-top: 0;"><?php _e('Full, Up Next, Masonry, Month with Sidebar, Widget, and more.', 'r34icspro'); ?></p>
     37    <h4 style="margin-bottom: 0;"><?php _e('Calendar Builder', 'r34icspro'); ?></h4>
     38    <p style="margin-top: 0;"><?php _e('Configure all calendar settings with an easy visual interface. Also works directly in Block Editor.', 'r34icspro'); ?></p>
     39    <h4 style="margin-bottom: 0;"><?php _e('Customizer', 'r34icspro'); ?></h4>
     40    <p style="margin-top: 0;"><?php _e('Easily modify your calendar color palettes, fonts, and more, site-wide.', 'r34icspro'); ?></p>
     41    <h4 style="margin-bottom: 0;"><?php _e('Enhanced Features', 'r34icspro'); ?></h4>
     42    <p style="margin-top: 0;"><?php _e('Additional capabilities are added to the core month, basic, list and week views.', 'r34icspro'); ?></p>
     43    <p><?php printf(__('Visit %s to learn more.', 'r34ics'), '<strong><a href="https://icscalendar.com/pro/" target="_blank">icscalendar.com/pro</a></strong>'); ?></p>
    3444   
    3545    <p style="text-align: center;"><a href="https://icscalendar.com/pro/" target="_blank" class="button button-primary"><?php _e('Go PRO!', 'r34ics'); ?></a></p>
     
    3949<div class="postbox"><div class="inside">
    4050
    41     <a href="https://room34.com/" target="_blank"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?>assets/room34-logo-on-white.svg" alt="Room 34 Creative Services" style="display: block; height: auto; margin: 1.5em auto; width: 200px;" /></a>
     51    <a href="https://room34.com/" target="_blank"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?>assets/room34-logo-on-white.svg" alt="Room 34 Creative Services" style="display: block; height: auto; margin: 1.5em auto; width: 0px;" /></a>
    4252           
    4353    <p style="text-align: center;">ICS Calendar v. <?php echo get_option('r34ics_version'); ?></p>
  • ics-calendar/trunk/templates/admin/utilities.php

    r2994179 r3091077  
    1 <div id="data-cache">
     1<div ">
    22
    3     <h3><?php printf(__('%1$s Data Cache', 'r34ics'), 'ICS Calendar'); ?></h3>
     3    <h>
    44
    5     <form id="r34ics-purge-calendar-transients" method="post" action="">
     5    <div id="data-cache">
     6   
     7        <h3><?php printf(__('%1$s Data Cache', 'r34ics'), 'ICS Calendar'); ?></h3>
     8   
     9        <form id="r34ics-purge-calendar-transients" method="post" action="">
     10            <?php
     11            wp_nonce_field('r34ics','r34ics-purge-calendar-transients-nonce');
     12            ?>
     13            <p><input type="submit" class="button button-primary" value="<?php echo esc_attr(__('Clear Cached Calendar Data', 'r34ics')); ?>" /></p>
     14            <p><?php _e('This will immediately clear all existing cached calendar data (purge transients), forcing WordPress to reload all calendars the next time they are viewed. Caching will then resume as before.', 'r34ics'); ?></p>
     15        </form>
     16   
     17    </div>
     18       
     19    <div id="ics-feed-url-tester">
     20   
     21        <h3><?php _e('ICS Feed URL Tester', 'r34ics'); ?></h3>
     22   
     23        <p><?php _e('If you are concerned that the plugin is not properly retrieving your feed, you can test the URL here.', 'r34ics'); ?></p>
     24   
     25        <form id="r34ics-url-tester" method="post" action="#ics-feed-url-tester">
     26            <?php
     27            wp_nonce_field('r34ics','r34ics-url-tester-nonce');
     28            ?>
     29            <div class="r34ics-input">
     30                <label for="r34ics-url-tester-url_to_test"><input type="text" name="url_to_test" id="r34ics-url-tester-url_to_test" value="<?php if (!empty($url_to_test)) { echo esc_attr($url_to_test); } ?>" placeholder="<?php echo esc_attr(__('Enter feed URL...', 'r34ics')); ?>" style="width: 50%;" /></label> <input type="submit" class="button button-primary" value="<?php echo esc_attr(__('Test URL', 'r34ics')); ?>" />
     31            </div>
     32        </form>
     33       
    634        <?php
    7         wp_nonce_field('r34ics','r34ics-purge-calendar-transients-nonce');
    8         ?>
    9         <input type="submit" class="button button-primary" value="<?php echo esc_attr(__('Clear Cached Calendar Data', 'r34ics')); ?>" />
    10         <p><?php _e('This will immediately clear all existing cached calendar data (purge transients), forcing WordPress to reload all calendars the next time they are viewed. Caching will then resume as before.', 'r34ics'); ?></p>
    11     </form>
    12 
    13 </div>
    14 
    15 <hr />
    16    
    17 <div id="ics-feed-url-tester">
    18 
    19     <h3><?php _e('ICS Feed URL Tester', 'r34ics'); ?></h3>
    20 
    21     <p><?php _e('If you are concerned that the plugin is not properly retrieving your feed, you can test the URL here.', 'r34ics'); ?></p>
    22 
    23     <form id="r34ics-url-tester" method="post" action="#ics-feed-url-tester">
    24         <?php
    25         wp_nonce_field('r34ics','r34ics-url-tester-nonce');
    26         ?>
    27         <div class="r34ics-input">
    28             <label for="r34ics-url-tester-url_to_test"><input type="text" name="url_to_test" id="r34ics-url-tester-url_to_test" value="<?php if (!empty($url_to_test)) { echo esc_attr($url_to_test); } ?>" placeholder="<?php echo esc_attr(__('Enter feed URL...', 'r34ics')); ?>" style="width: 50%;" /></label> <input type="submit" class="button button-primary" value="<?php echo esc_attr(__('Test URL', 'r34ics')); ?>" />
    29         </div>
    30     </form>
    31    
    32     <?php
    33     if (!empty($url_tester_result)) {
    34         ?>
    35         <h4><?php _e('Results:', 'r34ics'); ?></h4>
    36         <div><mark class="success"><?php printf(__('%s received.', 'r34ics'), size_format(strlen($url_tester_result), 2)); ?></mark></div>
    37         <?php
    38         if (strpos($url_tester_result,'BEGIN:VCALENDAR') === 0) {
     35        if (!empty($url_tester_result)) {
    3936            ?>
    40             <div><mark class="success"><?php _e('This appears to be a valid ICS feed URL.', 'r34ics'); ?></mark></div>
     37            <h3><?php _e('Results:', 'r34ics'); ?></h3>
     38            <div><mark class="success"><?php printf(__('%s received.', 'r34ics'), size_format(strlen($url_tester_result), 2)); ?></mark></div>
    4139            <?php
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
    4250        }
    4351        else {
    44             ?>
    45             <div><mark class="error"><?php _e('This does not appear to be a valid ICS feed URL.', 'r34ics'); ?></mark></div>
    46             <?php
     52            if (!empty($url_to_test)) {
     53                ?>
     54                <h3><?php _e('Results:', 'r34ics'); ?></h3>
     55                <div><mark class="error"><?php _e('Could not retrieve data from the requested URL.', 'r34ics'); ?></mark></div>
     56                <?php
     57            }
     58            elseif (isset($_POST['r34ics-url-tester-nonce'])) {
     59                ?>
     60                <h3><?php _e('Results:', 'r34ics'); ?></h3>
     61                <div><mark class="error"><?php _e('An unknown error occurred while attempting to retrieve the requested URL.', 'r34ics'); ?></mark></div>
     62                <?php
     63            }
    4764        }
    48     }
    49     else {
    50         if (!empty($url_to_test)) {
    51             ?>
    52             <h4><?php _e('Results:', 'r34ics'); ?></h4>
    53             <div><mark class="error"><?php _e('Could not retrieve data from the requested URL.', 'r34ics'); ?></mark></div>
    54             <?php
    55         }
    56         elseif (isset($_POST['r34ics-url-tester-nonce'])) {
    57             ?>
    58             <h4><?php _e('Results:', 'r34ics'); ?></h4>
    59             <div><mark class="error"><?php _e('An unknown error occurred while attempting to retrieve the requested URL.', 'r34ics'); ?></mark></div>
    60             <?php
    61         }
    62     }
    63     ?>
     65        ?>
     66   
     67    </div>
    6468
    6569</div>
     
    7276        )
    7377{
    74     ?>
    75     <hr />
    76    
    77     <div id="system-report">
     78    ?> 
     79    <div class="inside" id="system-report">
    7880
    79         <h3><?php _e('System Report', 'r34ics'); ?></h3>
     81        <h>
    8082
    8183        <p><mark class="info"><?php _e('Please copy the following text and include it in your message when emailing support.', 'r34ics'); ?><br />
Note: See TracChangeset for help on using the changeset viewer.