WordPress.org

Plugin Directory

Changeset 795453


Ignore:
Timestamp:
10/29/13 21:42:53 (6 months ago)
Author:
joedolson
Message:

Update dev version

Location:
my-calendar/trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • my-calendar/trunk/js/calendrical.css

    r781551 r795453  
    1010.calendricalDatePopup table .monthCell .monthName { background: #eee; width: 100%; padding: 2px; } 
    1111.calendricalDatePopup table .monthCell .prevMonth, .calendricalDatePopup table .monthCell .nextMonth { color: #fff; background: #777; display: block; line-height: 1; padding: 2px 8px; } 
     12.calendricalDatePopup table .monthCell .prevMonth:hover, .calendricalDatePopup table .monthCell .nextMonth:hover, .calendricalDatePopup table .monthCell .prevMonth:focus, .calendricalDatePopup table .monthCell .nextMonth:focus { background: #000; } 
    1213.calendricalDatePopup table .monthCell .prevMonth { border-radius: 16px 0 0 16px; } 
    1314.calendricalDatePopup table .monthCell .nextMonth { border-radius: 0 16px 16px 0; } 
     
    1516.calendricalDatePopup table td {text-align: center;padding: 0; } 
    1617.calendricalDatePopup table a {display: block; padding: 6px 8px; line-height: 1; } 
    17 .calendricalDatePopup table a:hover {background: #eee;border: none; text-decoration: underline} 
     18.calendricalDatePopup table a:hover, .calendricalDatePopup table a:focus {background: #eee;border: none; text-decoration: underline} 
    1819.calendricalDatePopup table td.today a {background: #ffc} 
    1920.calendricalDatePopup table td.selected a {background: #eef} 
     
    2425.calendricalTimePopup ul li {list-style: none;margin: 0} 
    2526.calendricalTimePopup ul li a, .calendricalTimePopup ul li a:visited {text-indent: 10px;padding: 4px;display: block;color: black;text-decoration: none} 
    26 .calendricalTimePopup ul li a:hover, .calendricalTimePopup ul li.selected a {background: #ccf} 
     27.calendricalTimePopup ul li a:hover, .calendricalTimePopup ul li a:focus, .calendricalTimePopup ul li.selected a {background: #ccf} 
    2728.calendricalEndTimePopup {width: 160px} 
  • my-calendar/trunk/js/jquery.calendrical.js

    r781981 r795453  
    11(function($) {  
    2     var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 
    3         'July', 'August', 'September', 'October', 'November', 'December']; 
    4          
     2    var monthNames = mc_months; 
     3     
    54    function getToday() { 
    65        var date = new Date(); 
     
    1413    function daysInMonth(year, month) { 
    1514        if (year instanceof Date) return daysInMonth(year.getFullYear(), year.getMonth()); 
    16         if (month == 1) { 
     15        if ( month == 1 ) { 
    1716            var leapYear = (year % 4 == 0) && 
    1817                (!(year % 100 == 0) || (year % 400 == 0)); 
     
    7473    } 
    7574     
    76     function formatTime(hour, minute) { 
    77         var printMinute = minute; 
    78         if (minute < 10) printMinute = '0' + minute;     
    79         var printHour = hour % 12; 
    80         if (printHour == 0) printHour = 12; 
    81         var half = (hour < 12) ? 'am' : 'pm'; 
    82         return printHour + ':' + printMinute + half; 
    83     } 
    84      
     75    function formatTime( hour, minute ) { 
     76        var d = new Date( 2013, 9, 1, hour, minute ); 
     77        var t=d.toLocaleTimeString(); 
     78        return t; 
     79    } 
     80     
    8581    function parseTime(text) { 
    86         var match = match = /(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(text); 
     82        var match = match = /(\d+)\s*[:\-\.,]\s*(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(text); 
    8783        if (match && match.length >= 3) { 
    8884            var hour = Number(match[1]); 
    89             var minute = Number(match[2]) 
    90             if (hour == 12 && match[3]) hour -= 12; 
    91             if (match[3] && match[3].toLowerCase() == 'pm') hour += 12; 
     85            var minute = Number(match[2]); 
     86            if (hour == 12 && match[4]) { hour -= 12; } 
     87            if (match[4] && match[4].toLowerCase() == 'pm') { hour += 12; } 
    9288            return { 
    9389                hour:   hour, 
     
    226222        var startTime = options.startTime && 
    227223            (options.startTime.hour * 60 + options.startTime.minute); 
    228          
     224                 
    229225        var scrollTo;   //Element to scroll the dropdown box to when shown 
    230226        var ul = $('<ul />'); 
     
    245241                    var timeText = formatTime(hour, minute); 
    246242                    var fullText = timeText; 
    247                     if (startTime != null) { 
     243                    if ( startTime != null ) { 
    248244                        var duration = roundNumber( ( (hour * 60 + minute) - startTime ), 2 ); 
    249                         if (duration < 60 && duration >= 0) { 
     245                        if ( duration < 0 ) { 
     246                            fullText = '<s>' + fullText + '</s>'; 
     247                        } else if (duration < 60 && duration >= 0) { 
    250248                            fullText += ' (' + duration + ' mins)'; 
    251249                        } else if (duration == 60) { 
     
    319317            var within = false; 
    320318             
    321             element.bind('focus click', function() { 
     319            element.bind('click', function() { 
     320            //element.bind('focus click', function() { 
    322321                if (div) return; 
    323322                var offset = element.position(); 
     
    335334                        top: offset.top + element.height 
    336335                    }); 
    337                 element.after(div);  
    338                  
     336                element.after(div); 
    339337                var selected = parseDate(element.val()); 
    340338                if (!selected.getFullYear()) selected = getToday(); 
     
    399397             
    400398            element.attr( "autocomplete", "off" ); 
    401             element.bind('focus click', function() { 
     399            element.bind('click', function() { 
     400            //element.bind('focus click', function() { // only allow keyboard focus once it works properly. 
    402401                if (div) return; 
    403402 
  • my-calendar/trunk/my-calendar-core.php

    r781554 r795453  
    240240    if ( isset($_GET['page']) && $_GET['page'] == 'my-calendar' ) { 
    241241        wp_enqueue_script('jquery.calendrical',plugins_url( 'js/jquery.calendrical.js', __FILE__ ), array('jquery') ); 
     242        wp_localize_script('jquery.calendrical', 'mc_months', array(  
     243            date_i18n( 'F', strtotime( 'January 1' ) ), 
     244            date_i18n( 'F', strtotime( 'February 1' ) ), 
     245            date_i18n( 'F', strtotime( 'March 1' ) ), 
     246            date_i18n( 'F', strtotime( 'April 1' ) ), 
     247            date_i18n( 'F', strtotime( 'May 1' ) ),          
     248            date_i18n( 'F', strtotime( 'June 1' ) ), 
     249            date_i18n( 'F', strtotime( 'July 1' ) ), 
     250            date_i18n( 'F', strtotime( 'August 1' ) ), 
     251            date_i18n( 'F', strtotime( 'September 1' ) ), 
     252            date_i18n( 'F', strtotime( 'October 1' ) ), 
     253            date_i18n( 'F', strtotime( 'November 1' ) ), 
     254            date_i18n( 'F', strtotime( 'December 1' ) ) 
     255        ) ); 
    242256        wp_enqueue_script('jquery.addfields',plugins_url( 'js/jquery.addfields.js', __FILE__ ), array('jquery') ); 
    243257        if ( version_compare( get_bloginfo( 'version' ) , '3.3' , '<' ) ) { 
     
    11711185// Mail functions (originally by Roland) 
    11721186function my_calendar_send_email( $details ) { 
    1173 $event = event_as_array($details); 
    1174     if ( get_option( 'mc_html_email' ) == 'true' ) { 
     1187    $event = event_as_array($details); 
     1188    // shift to boolean 
     1189    $send_email_option = ( get_option( 'mc_event_mail' ) == 'true' ) ? true : false; 
     1190    $send_email = apply_filters( 'mc_send_notification', $send_email_option, $event ); 
     1191    if ( $send_email == true ) { 
    11751192        add_filter('wp_mail_content_type',create_function('', 'return "text/html";')); 
    11761193    } 
     
    13861403} 
    13871404 
     1405// in multi-site, wp_is_mobile() won't be defined yet if plug-in is network activated.  
     1406if ( !function_exists( 'is_plugin_active_for_network' ) ) { 
     1407    require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); 
     1408} 
     1409 
    13881410if ( !function_exists( 'wp_is_mobile' ) ) { 
    1389     function wp_is_mobile() { return false; } 
    1390 } 
     1411    if ( !is_plugin_active_for_network( 'my-calendar/my-calendar.php' ) ) { 
     1412        function wp_is_mobile() { return false; } 
     1413    } 
     1414}    
     1415 
    13911416 
    13921417function mc_is_mobile() { 
     
    14071432        $value = $mcdb->get_var("SELECT id FROM $mcdb->posts WHERE post_title LIKE '%$guess%' AND post_status = 'publish'" ); 
    14081433        if ( $value && get_option( 'mc_uri' ) == '' ) { 
    1409             update_option( 'mc_uri', $value ); 
    1410             _e('Is this your calendar page?','my-calendar'); echo ' <code>'.get_permalink( $value ).'</code>'; 
    1411             return; 
     1434            $link = get_permalink( $value ); 
     1435            update_option( 'mc_uri', $link ); 
     1436            $return = __('Is this your calendar page?','my-calendar'); echo ' <code>'.$link.'</code>'; 
     1437            return $return; 
    14121438        } 
    14131439    } 
  • my-calendar/trunk/my-calendar-event-manager.php

    r781551 r795453  
    320320    } 
    321321    if ( $action == 'edit' && $proceed == true ) { 
    322     $url = ( get_option('mc_uri') != '' )?' '.sprintf(__('View <a href="%s">your calendar</a>.','my-calendar'),get_option('mc_uri') ):'';    
     322    $url = ( get_option('mc_uri') != '' && !is_numeric( get_option('mc_uri') ) )?' '.sprintf(__('View <a href="%s">your calendar</a>.','my-calendar'),get_option('mc_uri') ):'';     
    323323        $event_author = (int) ($_POST['event_author']); 
    324324        if ( mc_can_edit_event( $event_author ) ) {  
  • my-calendar/trunk/my-calendar-group-manager.php

    r781551 r795453  
    5252                    '%d' ); 
    5353            //$mcdb->print_error(); 
    54             $url = ( get_option('mc_uri') != '' )?' '.sprintf(__('View <a href="%s">your calendar</a>.','my-calendar'),get_option('mc_uri') ):''; 
     54            $url = ( get_option('mc_uri') != '' && !is_numeric( get_option('mc_uri') ) )?' '.sprintf(__('View <a href="%s">your calendar</a>.','my-calendar'),get_option('mc_uri') ):''; 
    5555                if ( $result === false ) { 
    5656                    $message = "<div class='error'><p><strong>".__('Error','my-calendar').":</strong>".__('Event not updated.','my-calendar')."$url</p></div>"; 
     
    157157                    '%d' ); 
    158158            //$mcdb->print_error(); 
    159             $url = ( get_option('mc_uri') != '' )?' '.sprintf(__('View <a href="%s">your calendar</a>.','my-calendar'),get_option('mc_uri') ):''; 
     159            $url = ( get_option('mc_uri') != '' && !is_numeric( get_option('mc_uri') ) )?' '.sprintf(__('View <a href="%s">your calendar</a>.','my-calendar'),get_option('mc_uri') ):''; 
    160160                do_action( 'mc_save_grouped_events', $result, $event_id, $update ); 
    161161                if ( $result === false ) { 
  • my-calendar/trunk/my-calendar-help.php

    r780544 r795453  
    7676</p> 
    7777<h4><?php _e('Additional Calendar Views (Upcoming events, today\'s events)','my-calendar'); ?></h4> 
    78 <p class="example"><code>[my_calendar_upcoming before="3" after="3" type="event" fallback="No events coming up!" category="General" author="1" template="{title} {date}" order="asc" show_today="yes" skip="0"]</code></p> 
     78<p class="example"><code>[my_calendar_upcoming before="3" after="3" type="event" fallback="No events coming up!" category="General" author="1" host="1" template="{title} {date}" order="asc" show_today="yes" skip="0"]</code></p> 
    7979<p> 
    8080    <?php _e('Displays the output of the Upcoming Events widget. The <code>before</code> and <code>after</code> attributes should be numbers; the <code>type</code> attribute can be either "event" or "days", and the <code>category</code> and <code>author</code> attributes work the same way as on the main calendar shortcode. Templates work using the template codes listed below. <code>fallback</code> provides text in case there are no events meeting your criteria. Order provides a sort order for the events list &ndash; either ascending (<code>asc</code>) or descending (<code>desc</code>). <code>show_today</code> is an indicator whether or not to include today\'s events in the list. <code>Skip</code> is the number of events to skip in the upcoming events.','my-calendar'); ?> 
    8181</p> 
    82 <p class="example"><code>[my_calendar_today category="" author="1" fallback="Nothing today!" template="{title} {date}"]</code></p> 
     82<p class="example"><code>[my_calendar_today category="" author="1" host="1" fallback="Nothing today!" template="{title} {date}"]</code></p> 
    8383<p> 
    8484    <?php _e('Displays the output of the Today\'s Events widget, with four configurable attributes: category, author, template and fallback text.','my-calendar'); ?> 
  • my-calendar/trunk/my-calendar-install.php

    r781551 r795453  
    119119     function(e) { 
    120120         e.preventDefault(); // remove line if you are using a link in the event title 
    121      $(this).parent().children().not(".event-title").toggle(); 
     121        $(this).parent().children().not(".event-title").toggle(); 
    122122     }); 
    123123  $(document).on("click", ".calendar-event .close", 
    124124     function(e) { 
    125125         e.preventDefault(); 
    126      $(this).parent().toggle(); 
     126        $(this).parent().toggle(); 
    127127     }); 
    128128    });';   
  • my-calendar/trunk/my-calendar-output.php

    r780638 r795453  
    433433<body>\n"; 
    434434echo my_calendar('print','calendar',$category,'','','','',$time,$ltype,$lvalue,'mc-print-view','','',null,null,'',''); 
    435 $return_url = ( get_option('mc_uri') != '' )?get_option('mc_uri'):home_url(); 
     435$return_url = ( get_option('mc_uri') != '' && !is_numeric( get_option('mc_uri') ) )?get_option('mc_uri'):home_url(); 
    436436$add = $_GET; 
    437437unset( $add['cid'] ); 
     
    840840        if ( $category == 'all' ) { $subtract[] = 'mcat'; unset( $add['mcat'] );  } 
    841841        $mc_print_url = mc_build_url( $add, $subtract, mc_feed_base() . 'my-calendar-print' ); 
    842         $print = "<p class='mc-print'><a href='$mc_print_url'>".__('Print View','my-calendar')."</a></p>"; 
     842        $print = "<div class='mc-print'><a href='$mc_print_url'>".__('Print View','my-calendar')."</a></div>"; 
    843843        // set up format toggle 
    844844        if ( $toggle == 'yes' || in_array( 'toggle', $used ) ) { 
     
    881881            $prevLink = mc_build_url( array( 'yr'=>$pLink['yr'],'month'=>$pLink['month'],'dy'=>$pLink['day'],'cid'=>$main_class ),array() ); 
    882882            $nextLink = mc_build_url( array( 'yr'=>$nLink['yr'],'month'=>$nLink['month'],'dy'=>$nLink['day'],'cid'=>$main_class ),array() ); 
    883             $previous_link = apply_filters('mc_previous_link','     <li class="my-calendar-prev"><a href="' . $prevLink.'" rel="'.$id.'">'.$pLink['label'].'</a></li>',$pLink); 
    884             $next_link = apply_filters('mc_next_link','     <li class="my-calendar-next"><a href="' . $nextLink .'" rel="'.$id.'">'.$nLink['label'].'</a></li>',$nLink); 
     883            $previous_link = apply_filters( 'mc_previous_link','        <li class="my-calendar-prev"><a href="' . $prevLink.'" rel="'.$id.'">'.$pLink['label'].'</a></li>',$pLink ); 
     884            $next_link = apply_filters( 'mc_next_link','        <li class="my-calendar-next"><a href="' . $nextLink .'" rel="'.$id.'">'.$nLink['label'].'</a></li>',$nLink ); 
    885885            $nav = ' 
    886886                <div class="my-calendar-nav"> 
     
    10401040                                            if ( $category != '' ) { $target['mcat'] = $category; } 
    10411041                                            $day_url = mc_build_url( $target, array('month','dy','yr','ltype','loc','mcat','cid'), apply_filters ( 'mc_modify_day_uri', get_option( 'mc_uri' ) ) ); 
    1042                                             $link = ( get_option('mc_uri') != '' )?$day_url:'#'; 
     1042                                            $link = ( get_option('mc_uri') != '' && !is_numeric( get_option('mc_uri') ) )?$day_url:'#'; 
    10431043                                        } else { 
    10441044                                            $atype = str_replace( 'anchor','',get_option('mc_open_day_uri') ); 
     
    13421342$home = ''; 
    13431343    if ( $root != '' ) { $home = $root; } 
     1344    if ( is_numeric( $root ) ) { $home = get_permalink( $root ); }   
    13441345    if ( $home == '' ) { 
    13451346        if ( is_front_page() ) {  
  • my-calendar/trunk/my-calendar-settings.php

    r780544 r795453  
    476476    <ul> 
    477477    <li> 
    478     <?php $guess = mc_guess_calendar(); $mc_uri = get_option('mc_uri'); ?> 
     478    <?php $guess = mc_guess_calendar(); $mc_uri = get_option( 'mc_uri' ); ?> 
    479479    <label for="mc_uri"><?php _e('Where is your main calendar page?','my-calendar'); ?></label>  
    480480    <input type="text" name="mc_uri" id="mc_uri" size="60" value="<?php echo esc_url($mc_uri); ?>" /><br /><small><?php _e('Can be any Page or Post which includes the <code>[my_calendar]</code> shortcode.','my-calendar'); ?> <?php echo $guess; ?></small> 
  • my-calendar/trunk/my-calendar-shortcodes.php

    r780544 r795453  
    5757        $host = apply_filters( 'mc_display_host', $user_ID, 'upcoming' ); 
    5858    }    
    59     return my_calendar_upcoming_events($before, $after, $type, $category, $template, $fallback, $order, $skip, $show_today, $author ); 
     59    return my_calendar_upcoming_events($before, $after, $type, $category, $template, $fallback, $order, $skip, $show_today, $author, $host ); 
    6060} 
    6161 
     
    7575        $host = apply_filters( 'mc_display_host', $user_ID, 'today' ); 
    7676    }            
    77     return my_calendar_todays_events($category, $template, $fallback, $author); 
     77    return my_calendar_todays_events($category, $template, $fallback, $author, $host); 
    7878} 
    7979 
  • my-calendar/trunk/my-calendar-templates.php

    r780544 r795453  
    33 
    44function jd_draw_template($array,$template,$type='list') { 
    5     //$mtime = microtime( true); // DEBUG PERFORMANCE 
    65    //1st argument: array of details 
    76    //2nd argument: template to print details into 
     
    1312            if ( strpos( $template, "{".$key ) !== false ) { 
    1413                if ($type != 'list') { 
    15                     if ( $key == 'link' && $value == '') { $value = ( get_option('mc_uri') != '' )?get_option('mc_uri'):home_url(); } 
     14                    if ( $key == 'link' && $value == '') { $value = ( get_option('mc_uri') != '' && !is_numeric( get_option('mc_uri') ) )?get_option('mc_uri'):home_url(); } 
    1615                    if ( $key != 'guid') { $value = htmlentities($value); } 
    1716                } 
     
    286285            $details_link = ''; 
    287286        } 
    288     $details['details_link'] = ( get_option( 'mc_uri' ) != '' )?$details_link:''; 
    289     $details['details'] = ( get_option( 'mc_uri' ) != '' )?"<a href='$details_link' class='mc-details'>$details_label</a>":''; 
     287    $details['details_link'] = ( get_option( 'mc_uri' ) != '' && !is_numeric( get_option('mc_uri') ) )?$details_link:''; 
     288    $details['details'] = ( get_option( 'mc_uri' ) != '' && !is_numeric( get_option('mc_uri') ) )?"<a href='$details_link' class='mc-details'>$details_label</a>":''; 
    290289    $details['linking'] = ( $event->event_url != '' )?$event->event_url:$details_link; 
    291290    $details['dateid'] = $dateid; // unique ID for this date of this event 
     
    297296    // RSS guid 
    298297    $details['region'] = $event->event_region; 
    299     $details['guid'] =( get_option( 'mc_uri' ) != '')?"<guid isPermaLink='true'>$details_link</guid>":"<guid isPermalink='false'>$details_link</guid>"; 
     298    $details['guid'] =( get_option( 'mc_uri' ) != '' && !is_numeric( get_option('mc_uri') ) )?"<guid isPermaLink='true'>$details_link</guid>":"<guid isPermalink='false'>$details_link</guid>"; 
    300299    /* ical format */ 
    301300    $details['ical_location'] = $event->event_label .' '. $event->event_street .' '. $event->event_street2 .' '. $event->event_city .' '. $event->event_state .' '. $event->event_postcode; 
     
    304303    $details['ical_desc'] = $ical_description; 
    305304    // get URL, TITLE, LOCATION, DESCRIPTION strings 
    306         $url = ( get_option( 'mc_uri' ) != '' )?$details_link:$event->event_url; 
     305        $url = ( get_option( 'mc_uri' ) != '' && !is_numeric( get_option('mc_uri') ) )?$details_link:$event->event_url; 
    307306        $title = stripcslashes($event->event_title); 
    308307        $location = mc_maplink( $event, 'gcal' ); 
  • my-calendar/trunk/my-calendar-widgets.php

    r776220 r795453  
    2929        $author = ( !isset($instance['my_calendar_today_author']) || $instance['my_calendar_today_author']=='')?'all':esc_attr($instance['my_calendar_today_author']); 
    3030        $host = ( !isset($instance['mc_host']) || $instance['mc_host']=='')?'all':esc_attr($instance['mc_host']); 
    31         $widget_link = (!empty($instance['my_calendar_today_linked']) && $instance['my_calendar_today_linked']=='yes')?get_option('mc_uri'):''; 
     31        $default_link = ( is_numeric( get_option('mc_uri') ) ) ? get_permalink( get_option('mc_uri') ) : get_option('mc_uri'); 
     32        $widget_link = ( !empty($instance['my_calendar_today_linked']) && $instance['my_calendar_today_linked']=='yes')?$default_link:''; 
    3233        $widget_link = ( !empty($instance['mc_link']) )?esc_url($instance['mc_link']):$widget_link; 
    3334        $widget_title = empty($the_title) ? '' : $the_title; 
     
    5354        $widget_category = (isset($instance['my_calendar_today_category']))?esc_attr($instance['my_calendar_today_category']):''; 
    5455        $widget_linked = (isset($instance['my_calendar_today_linked']))?esc_attr($instance['my_calendar_today_linked']):''; 
    55         if ( $widget_linked == 'yes' ) { $default_link = get_option('mc_uri'); } else { $default_link = ''; } 
     56        if ( $widget_linked == 'yes' ) { $default_link = ( is_numeric( get_option('mc_uri') ) ) ? get_permalink( get_option('mc_uri') ) : get_option('mc_uri'); } else { $default_link = ''; } 
    5657        $widget_link = (!empty($instance['mc_link']))?esc_url($instance['mc_link']):$default_link; 
    5758        $widget_author = (isset($instance['my_calendar_today_author']))?esc_attr($instance['my_calendar_today_author']):''; 
     
    154155        $widget_order = (isset($instance['my_calendar_upcoming_order']) )?esc_attr($instance['my_calendar_upcoming_order']):''; 
    155156        $widget_linked = (isset($instance['my_calendar_upcoming_linked']) )?esc_attr($instance['my_calendar_upcoming_linked']):''; 
    156         if ( $widget_linked == 'yes' ) { $default_link = get_option('mc_uri'); } else { $default_link = ''; } 
     157        if ( $widget_linked == 'yes' ) { $default_link = ( is_numeric( get_option('mc_uri') ) ) ? get_permalink( get_option('mc_uri') ) : get_option('mc_uri'); } else { $default_link = ''; } 
    157158        $widget_link = (!empty($instance['mc_link']))?esc_url($instance['mc_link']):$default_link; 
    158159        $widget_skip = (isset($instance['my_calendar_upcoming_skip']) )?esc_attr($instance['my_calendar_upcoming_skip']):'';     
     
    169170        <legend><?php _e('Widget Options','my-calendar'); ?></legend> 
    170171        <?php $config_url = admin_url("admin.php?page=my-calendar-config"); ?> 
    171         <?php if ( get_option('mc_uri') == '' ) { $disabled = " disabled='disabled'";  _e('Add <a href="'.$config_url.'#mc_uri" target="_blank" title="Opens in new window">calendar URL in settings</a> to use this option.','my-calendar');  } else { $disabled=""; } ?> 
     172        <?php if ( get_option('mc_uri') == '' && !is_numeric( get_option('mc_uri') ) ) { $disabled = " disabled='disabled'";  _e('Add <a href="'.$config_url.'#mc_uri" target="_blank" title="Opens in new window">calendar URL in settings</a> to use this option.','my-calendar');  } else { $disabled=""; } ?> 
    172173        <p> 
    173174        <label for="<?php echo $this->get_field_id('mc_link'); ?>"><?php _e('Widget title links to:','my-calendar'); ?></label><br /> 
  • my-calendar/trunk/my-calendar.php

    r781984 r795453  
    66Author: Joseph C Dolson 
    77Author URI: http://www.joedolson.com 
    8 Version: 2.2.12 
     8Version: 2.2.13 
    99*/ 
    1010/*  Copyright 2009-2013  Joe Dolson (email : joe@joedolson.com) 
     
    2929 
    3030global $mc_version, $wpdb; 
    31 $mc_version = '2.2.12'; 
     31$mc_version = '2.2.13'; 
    3232 
    3333// Define the tables used in My Calendar 
     
    394394            $checked = ($value == 'on')?"checked='checked'":''; 
    395395            $allowed = ( $settings_options[$key] == 'on' )?true:false; 
    396             if ( !current_user_can('manage_options') && !$allowed ) { 
     396            if ( !( current_user_can('manage_options') && get_option( 'mc_input_options_administrators' ) == 'true' ) && !$allowed ) { 
    397397                // don't display options if this user can't use them. 
    398398                $output .= "<input type='hidden' name='mc_show_on_page[$key]' value='off' />"; 
  • my-calendar/trunk/readme.txt

    r781988 r795453  
    44Tags: calendar, dates, times, events, scheduling, event manager, event calendar 
    55Requires at least: 3.3.0 
    6 Tested up to: 3.6.1 
     6Tested up to: 3.7.0 
    77License: GPLv2 or later 
    88Stable tag: 2.2.12 
     
    8686 
    8787== Changelog == 
     88 
     89= 2.2.13 = 
     90 
     91* Bug fix: Threw error if network-activated (wp_is_mobile() not defined yet) 
     92* Bug fix: Calendar URI could be saved as integer instead of as URL. 
     93* Bug fix: hide screen options that current user can't use. 
     94* Improved localization of Calendrical jQuery plug-in. 
     95* Feature: my_calendar_upcoming and my_calendar_today shortcodes now support filtering by host. 
     96* New filter: mc_send_notification -- passes event and user data to determine whether a new event email notification should be sent. Return true|false. 
    8897 
    8998= 2.2.12 = 
  • my-calendar/trunk/templates/refresh.css

    r699369 r795453  
    1414.mc-main .mc-date, .mc-main.mini td {background:#f6f6f6} 
    1515.mc-main .weekend .mc-date {background:#f0f1f5; color: #000} 
    16 .mc-main .details .mc-event-date {font-weight: 700; font-size: 1.3em; text-shadow: 1px 1px 2px #aaa} 
     16.mc-main .details .mc-event-date { font-weight: 700; font-size: 1.3em; } 
     17.mc-main .details .time-block p { padding: 0; margin: 0; } 
    1718.mc-main .my-calendar-nav li a { 
    1819color: #fff; text-decoration: none;  
Note: See TracChangeset for help on using the changeset viewer.