WordPress.org

Plugin Directory

Changeset 860300


Ignore:
Timestamp:
02/18/14 16:20:31 (18 months ago)
Author:
joedolson
Message:

Commit dev.

Location:
my-calendar/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • my-calendar/trunk/my-calendar-behaviors.php

    r857615 r860300  
    7878    </p>   
    7979    <fieldset> 
    80     <legend><?php _e('Calendar Behaviors: Calendar View','my-calendar'); ?></legend> 
    81     <p> 
    82     <input type="checkbox" id="reset_caljs" name="reset_caljs" /> <label for="reset_caljs"><?php _e('Update/Reset the My Calendar Calendar Javascript','my-calendar'); ?></label> <input type="checkbox" id="calendar_javascript" name="calendar_javascript" value="1"  <?php mc_is_checked('mc_calendar_javascript',1); ?>/> <label for="calendar_javascript"><?php _e('Disable Calendar Javascript Effects','my-calendar'); ?></label> 
    83     </p> 
    84     <p> 
    85     <label for="calendar-javascript"><?php _e('Edit the jQuery scripts for My Calendar in Calendar format','my-calendar'); ?></label><br /><textarea id="calendar-javascript" name="mc_caljs" rows="8" cols="80"><?php echo $mc_caljs; ?></textarea> 
     80    <legend><?php _e('Calendar Behaviors: Grid View','my-calendar'); ?></legend> 
     81    <p> 
     82    <input type="checkbox" id="reset_caljs" name="reset_caljs" /> <label for="reset_caljs"><?php _e('Update Grid View JavaScript','my-calendar'); ?></label> <input type="checkbox" id="calendar_javascript" name="calendar_javascript" value="1"  <?php mc_is_checked('mc_calendar_javascript',1); ?>/> <label for="calendar_javascript"><?php _e('Disable Grid Javascript','my-calendar'); ?></label> 
     83    </p> 
     84    <p> 
     85    <label for="calendar-javascript"><?php _e('Edit jQuery scripts for My Calendar in Grid View','my-calendar'); ?></label><br /><textarea id="calendar-javascript" name="mc_caljs" rows="8" cols="80"><?php echo $mc_caljs; ?></textarea> 
    8686    </p> 
    8787    <?php 
     
    112112    <legend><?php _e('Calendar Behaviors: List View','my-calendar'); ?></legend> 
    113113    <p> 
    114     <input type="checkbox" id="reset_listjs" name="reset_listjs" /> <label for="reset_listjs"><?php _e('Update/Reset the My Calendar List Javascript','my-calendar'); ?></label> <input type="checkbox" id="list_javascript" name="list_javascript" value="1" <?php mc_is_checked('mc_list_javascript',1); ?> /> <label for="list_javascript"><?php _e('Disable List Javascript Effects','my-calendar'); ?></label>  
     114    <input type="checkbox" id="reset_listjs" name="reset_listjs" /> <label for="reset_listjs"><?php _e('Update List JavaScript','my-calendar'); ?></label> <input type="checkbox" id="list_javascript" name="list_javascript" value="1" <?php mc_is_checked('mc_list_javascript',1); ?> /> <label for="list_javascript"><?php _e('Disable List JavaScript','my-calendar'); ?></label>  
    115115    </p> 
    116116    <p> 
     
    143143    <legend><?php _e('Calendar Behaviors: Mini Calendar View','my-calendar'); ?></legend> 
    144144    <p> 
    145     <input type="checkbox" id="reset_minijs" name="reset_minijs" /> <label for="reset_minijs"><?php _e('Update/Reset the My Calendar Mini Format Javascript','my-calendar'); ?></label> <input type="checkbox" id="mini_javascript" name="mini_javascript" value="1" <?php mc_is_checked('mc_mini_javascript',1); ?> /> <label for="mini_javascript"><?php _e('Disable Mini Javascript Effects','my-calendar'); ?></label>  
    146     </p> 
    147     <p> 
    148     <label for="mini-javascript"><?php _e('Edit the jQuery scripts for My Calendar in Mini Calendar format','my-calendar'); ?></label><br /><textarea id="mini-javascript" name="mc_minijs" rows="8" cols="80"><?php echo $mc_minijs; ?></textarea> 
     145    <input type="checkbox" id="reset_minijs" name="reset_minijs" /> <label for="reset_minijs"><?php _e('Update Mini View JavaScript','my-calendar'); ?></label> <input type="checkbox" id="mini_javascript" name="mini_javascript" value="1" <?php mc_is_checked('mc_mini_javascript',1); ?> /> <label for="mini_javascript"><?php _e('Disable Mini JavaScript','my-calendar'); ?></label>  
     146    </p> 
     147    <p> 
     148    <label for="mini-javascript"><?php _e('Edit jQuery scripts in Mini view','my-calendar'); ?></label><br /><textarea id="mini-javascript" name="mc_minijs" rows="8" cols="80"><?php echo $mc_minijs; ?></textarea> 
    149149    </p> 
    150150    <?php 
     
    173173     
    174174    <fieldset id="adiff"> 
    175     <legend><?php _e('Calendar Behaviors: AJAX Navigation','my-calendar'); ?></legend> 
    176     <p> 
    177     <input type="checkbox" id="reset_ajaxjs" name="reset_ajaxjs" /> <label for="reset_ajaxjs"><?php _e('Update/Reset the My Calendar AJAX Javascript','my-calendar'); ?></label> <input type="checkbox" id="ajax_javascript" name="ajax_javascript" value="1" <?php mc_is_checked('mc_ajax_javascript',1); ?> /> <label for="ajax_javascript"><?php _e('Disable AJAX Effects','my-calendar'); ?></label>  
    178     </p> 
    179     <p> 
    180     <label for="ajax-javascript"><?php _e('Edit the jQuery scripts for My Calendar AJAX navigation','my-calendar'); ?></label><br /><textarea id="ajax-javascript" name="mc_ajaxjs" rows="8" cols="80"><?php echo $mc_ajaxjs; ?></textarea> 
     175    <legend><?php _e('Calendar Behaviors: AJAX','my-calendar'); ?></legend> 
     176    <p> 
     177    <input type="checkbox" id="reset_ajaxjs" name="reset_ajaxjs" /> <label for="reset_ajaxjs"><?php _e('Update AJAX JavaScript','my-calendar'); ?></label> <input type="checkbox" id="ajax_javascript" name="ajax_javascript" value="1" <?php mc_is_checked('mc_ajax_javascript',1); ?> /> <label for="ajax_javascript"><?php _e('Disable AJAX Navigation','my-calendar'); ?></label>  
     178    </p> 
     179    <p> 
     180    <label for="ajax-javascript"><?php _e('Edit jQuery scripts for AJAX navigation','my-calendar'); ?></label><br /><textarea id="ajax-javascript" name="mc_ajaxjs" rows="8" cols="80"><?php echo $mc_ajaxjs; ?></textarea> 
    181181    </p> 
    182182    <?php 
  • my-calendar/trunk/my-calendar-core.php

    r857615 r860300  
    280280 
    281281function my_calendar_write_js() { 
    282     if ( isset($_GET['page']) && $_GET['page']=='my-calendar' || $_GET['page'] == 'my-calendar-locations' ) { 
     282    if ( isset( $_GET['page'] ) && ( $_GET['page']=='my-calendar' || $_GET['page'] == 'my-calendar-locations' ) ) { 
    283283    ?> 
    284284    <script type="text/javascript"> 
     
    18871887function mc_register_actions() { 
    18881888    apply_filters( "debug", 'my_calendar add actions/filters' ); 
    1889     add_filter( 'mc_event_registration', 'mc_standard_event_registration', 10, 3 ); 
     1889    add_filter( 'mc_event_registration', 'mc_standard_event_registration', 10, 4 ); 
    18901890    add_action( 'mc_transition_event', 'mc_tweet_approval', 10, 2 ); 
    18911891    add_action( 'mc_save_event', 'mc_event_post', 10, 3 ); 
  • my-calendar/trunk/my-calendar-event-manager.php

    r859129 r860300  
    11<?php 
    22if ( ! defined( 'ABSPATH') ) exit; // Exit if accessed directly 
     3 
     4function mc_switch_sites() { 
     5    if ( function_exists('is_multisite') && is_multisite() ) { 
     6        if ( get_site_option('mc_multisite') == 2 && MY_CALENDAR_TABLE != MY_CALENDAR_GLOBAL_TABLE ) { 
     7            if ( get_option( 'mc_current_table' ) == '1' ) { 
     8                // can post to either, but is currently set to post to central table 
     9                return true; 
     10            } 
     11        } else if ( get_site_option('mc_multisite') == 1 && MY_CALENDAR_TABLE != MY_CALENDAR_GLOBAL_TABLE ) { 
     12            // can only post to central table 
     13            return true; 
     14        } 
     15    } 
     16    return false; 
     17} 
    318 
    419function mc_event_post( $action, $data, $event_id ) { 
     
    3449            'post_excerpt'=> $excerpt 
    3550        ); 
    36         $post_id = wp_update_post( $my_post ); 
     51        if ( mc_switch_sites() ) { switch_to_blog( BLOG_ID_CURRENT_SITE ); } 
     52        $post_id = wp_update_post( $my_post );  
    3753        wp_set_object_terms( $post_id, (int) $term, 'mc-event-category'); 
    3854        if ( $data['event_image'] == '' ) { 
     
    4662        mc_update_event( 'event_access', $access_terms, $event_id, '%s' ); 
    4763        do_action( 'mc_update_event_post', $post_id, $_POST, $data, $event_id ); 
     64        if ( mc_switch_sites() ) { restore_current_blog(); } 
    4865    } 
    4966} 
     
    830847        </p> 
    831848    <?php } ?> 
    832         <?php echo apply_filters( 'mc_event_details', $has_data, $data, 'admin' ); ?>                            
     849        <?php echo apply_filters( 'mc_event_details', '', $has_data, $data, 'admin' ); ?>                            
    833850    </fieldset> 
    834851</div> 
     
    968985        <div class="inside">         
    969986            <?php echo mc_event_accessibility( $data, $label ); ?> 
    970             <?php echo apply_filters( 'mc_event_accessibility', $has_data, $data ); ?>                           
     987            <?php echo apply_filters( 'mc_event_accessibility', '', $has_data, $data ); ?>                           
    971988        </div> 
    972989        </div> 
     
    980997            <fieldset> 
    981998            <legend><?php _e('Event Registration','my-calendar'); ?></legend> 
    982             <?php echo apply_filters( 'mc_event_registration', $has_data, $data, 'admin' ); ?>       
     999            <?php echo apply_filters( 'mc_event_registration', '', $has_data, $data, 'admin' ); ?>       
    9831000            </fieldset> 
    9841001        </div> 
     
    11931210 
    11941211function mc_event_accessibility( $data, $label ) { 
     1212    $note_value = ''; 
    11951213    $access_list = " 
    11961214        <fieldset> 
     
    19181936} 
    19191937 
    1920 function mc_standard_event_registration( $has_data, $data, $context='admin' ) { 
     1938function mc_standard_event_registration( $form, $has_data, $data, $context='admin' ) { 
    19211939    if ( $has_data ) { 
    19221940        $event_open = jd_option_selected( $data->event_open,'1' ); 
     
    19311949    } 
    19321950    if ( $context == 'admin' ) { 
    1933     $form = " 
     1951    $form .= " 
    19341952            <p> 
    19351953                <input type='radio' id='event_open' name='event_open' value='1' $event_open /> <label for='event_open'>".__('Open','my-calendar')."</label> 
     
    19411959            </p>"; 
    19421960    } else { 
    1943         $form = '<input type="hidden" name="event_open" value="2" />'; 
     1961        $form .= '<input type="hidden" name="event_open" value="2" />'; 
    19441962    } 
    19451963    $form .= "<p> 
  • my-calendar/trunk/my-calendar-help.php

    r857615 r860300  
    1414    <div class="inside"> 
    1515    <?php do_action( 'mc_before_help' ); ?> 
    16     <ul class="mc-settings"> 
     16    <ul class="mc-settings checkboxes"> 
    1717        <li><a href="#mc-shortcodes"><?php _e('Shortcodes','my-calendar'); ?></a></li> 
    1818        <li><a href="#icons"><?php _e('Icons','my-calendar'); ?></a></li> 
     
    3030<h3 id="help"><?php _e('Getting Started','my-calendar'); ?></h3> 
    3131    <div class="inside"> 
    32     <p> 
    33     <?php _e('Although the My Calendar plug-in is very complicated in terms of what can be customized, the basic usage is quite simple.','my-calendar'); ?> 
    34     </p> 
    3532    <ul> 
    36         <li> - <?php _e('Add the My Calendar shortcode (<code>[my_calendar]</code>) to a page.','my-calendar'); ?></li> 
    37         <li> - <?php _e('Add events by clicking on the Add/Edit Events link in the admin sidebar or on "Add Events" in the admin toolbar.','my-calendar'); ?></li> 
    38         <li> - <?php _e('Select your preferred stylesheet in the Styles Editor','my-calendar'); ?></li> 
     33        <li><?php _e('Add the My Calendar shortcode (<code>[my_calendar]</code>) to a page.','my-calendar'); ?></li> 
     34        <li><?php _e('Add events by clicking on the Add/Edit Events link in the admin or on "Add Events" in the toolbar.','my-calendar'); ?></li> 
     35        <li><?php _e('Select your preferred stylesheet in the Styles Editor','my-calendar'); ?></li> 
    3936    </ul> 
    4037    <p> 
    41     <?php _e('Read more of the basic help documentation on this page or purchase the My Calendar User\'s Guide to customize further -- but the above is all that you need to do to begin using the calendar.','my-calendar'); ?> 
     38    <?php printf( __('Read more help documentation below or <a href="%s">purchase the My Calendar User\'s Guide</a> to learn more -- but the above is all that you need to do to begin using the calendar.','my-calendar'), 'https://www.joedolson.com/articles/my-calendar/users-guide/' ); ?> 
    4239    </p> 
    4340    </div> 
     
    4946    <h3><?php _e('Shortcode Syntax','my-calendar'); ?></h3> 
    5047    <div class="inside">     
    51 <p> 
    52 <?php _e('These shortcodes can be used in Posts, Pages, or in text widgets.','my-calendar'); ?> 
    53 </p> 
     48 
    5449<h4><?php _e('Main Calendar Shortcode (List or Grid, Weekly or Monthly view)','my-calendar'); ?></h4> 
    5550<p class="example"><code>[my_calendar]</code></p> 
    56 <p> 
    57 <?php _e('This basic shortcode will show the one-week view of the calendar on a post or page including all categories and the category key, in a list format. The standard previous/next navigation will be included above the calendar, the link to the print format (if enabled) will be shown below.','my-calendar'); ?> 
    58 </p> 
     51<h4><?php _e('Example Customized Shortcode','my-calendar'); ?></h4> 
    5952<p class="example"><code>[my_calendar format="list" above="nav" below="print" time="week"]</code></p> 
    6053<p> 
    61 <?php _e('The shortcode supports these attributes:','my-calendar'); ?> 
     54<?php _e('This shortcode shows the one-week view of the calendar on a post or page including all categories and the category key, in a list format. The standard previous/next navigation will be included above the calendar, the link to the print format (if enabled) will be shown below.','my-calendar'); ?> 
     55</p> 
     56<p> 
     57<?php _e('Shortcode attributes:','my-calendar'); ?> 
    6258</p> 
    6359    <ul> 
    64     <li><code>category</code>: <?php _e('Names or IDs of categories included in this calendar, comma or pipe separated.','my-calendar'); ?></li> 
    65     <li><code>format</code>: <?php _e('Either "list" or "mini" to show the list view or the mini calendar; exclude or any other value to show the main grid calendar.','my-calendar'); ?></li> 
    66     <li><code>above</code>, <code>below</code>: <?php _e("Comma-separated list of navigational features to display above or below the calendar. Available: <strong>nav, toggle, jump, print, key, feeds, timeframe</strong>. Order listed determines the order displayed. Feed links and print view will only display if they are enabled on the settings page. All other fields will appear if specified; the defaults specified in settings will be used if the attribute is left blank. Use <em>none</em> to hide all navigation elements.",'my-calendar'); ?></li> 
    67     <li><code>time</code>: <?php _e('Set to "week" to show a one week view or to "day" to show a single day view. Any other value will show a month view. (Day view shows as a list regardless of format setting.)','my-calendar'); ?></li> 
    68     <li><code>ltype</code>: <?php _e('The type of location data to restrict by.','my-calendar'); ?></li> 
    69     <li><code>lvalue</code>: <?php _e('The specific location information to filter to.','my-calendar'); ?></li> 
    70     <li><code>author</code>: <?php _e('Author or comma-separated list of authors (usernames or IDs) to show events from.','my-calendar'); ?></li> 
    71     <li><code>host</code>: <?php _e('Host or comma-separated list of hosts (WordPress usernames or IDs) to show events from.','my-calendar'); ?></li> 
    72     <li><code>id</code>: <?php _e('String to give this specific calendar shortcode a unique ID. Use when showing multiple calendars in a Page or post.','my-calendar'); ?></li> 
     60    <li><code>category</code>: <?php _e('Names or IDs of categories in the calendar, comma or pipe separated.','my-calendar'); ?></li> 
     61    <li><code>format</code>: <?php _e('"list" or "mini"; exclude or any other value to show a calendar grid.','my-calendar'); ?></li> 
     62    <li><code>above</code>, <code>below</code>: <?php _e("Comma-separated list of navigation to display above or below the calendar. Available: <strong>nav, toggle, jump, print, key, feeds, timeframe</strong>. Order listed determines the order displayed. Defaults in settings will be used if the attribute is blank. Use <em>none</em> to hide all navigation.",'my-calendar'); ?></li> 
     63    <li><code>time</code>: <?php _e('Set to "week" to show a one week view or to "day" to show a single day view. Any other value will show a month view. (Day view always shows as a list.)','my-calendar'); ?></li> 
     64    <li><code>ltype</code>: <?php _e('Type of location data to restrict by.','my-calendar'); ?></li> 
     65    <li><code>lvalue</code>: <?php _e('Specific location information to filter to.','my-calendar'); ?></li> 
     66    <li><code>author</code>: <?php _e('Author or comma-separated list (usernames or IDs) to show events from.','my-calendar'); ?></li> 
     67    <li><code>host</code>: <?php _e('Host or comma-separated list (usernames or IDs) to show events from.','my-calendar'); ?></li> 
     68    <li><code>id</code>: <?php _e('String to give shortcode a unique ID.','my-calendar'); ?></li> 
    7369    </ul> 
    7470<p> 
    7571<em><?php _e('The main My Calendar shortcode can be generated from a button in your post and page editor. The mini calendar can also be accessed and configured as a widget.','my-calendar'); ?></em> 
    7672</p> 
    77 <h4><?php _e('Additional Calendar Views (Upcoming events, today\'s events)','my-calendar'); ?></h4> 
     73<h4><?php _e('Additional Views (Upcoming events, today\'s events)','my-calendar'); ?></h4> 
    7874<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> 
    7975<p> 
    80     <?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'); ?> 
     76    <?php _e('Displays the output of the Upcoming Events widget. <code>before</code> and <code>after</code> are numbers; <code>type</code> is either "event" or "days", and <code>category</code> and <code>author</code> work the same as in the main calendar shortcode. Templates use the template codes listed below. <code>fallback</code> provides text if no events meet your criteria. Order sets sort order for the list &ndash; ascending (<code>asc</code>) or descending (<code>desc</code>). <code>show_today</code> indicates whether to include today\'s events in the list. <code>Skip</code> is how many events to skip in the list.','my-calendar'); ?> 
    8177</p> 
    8278<p class="example"><code>[my_calendar_today category="" author="1" host="1" fallback="Nothing today!" template="{title} {date}"]</code></p> 
     
    8581</p> 
    8682<p> 
    87 <em><?php _e('Both Upcoming Events and Today\'s Events can also be configured using widgets.','my-calendar'); ?></em> 
     83<em><?php _e('Upcoming Events and Today\'s Events can also be configured as widgets.','my-calendar'); ?></em> 
    8884</p> 
    8985<p class="example"><code>[my_calendar_event event="" template="&lt;h3&gt;{title}&lt;/h3&gt;{description}" list="&lt;li&gt;{date}, {time}&lt;/li&gt;" before="&lt;ul&gt;" after="&lt;/ul&gt;"]</code></p> 
     
    9288</p> 
    9389 
    94 <h4><?php _e('Supplement Features (Locations filter, Categories filter)','my-calendar'); ?></h4> 
     90 
     91<h4><?php _e( 'Calendar Filter Shortcodes', 'my-calendar' ); ?></h4> 
    9592 
    9693<p class="example"><code>[my_calendar_locations show="list" type="saved" datatype="name"]</code></p> 
    9794<p> 
    98     <?php _e('List of event locations, either as a list of links or as a select form. The <code>show</code> attribute can either be <code>list</code> or <code>form</code>, <code>type</code> is either <code>saved</code> (to show items from your stored locations), or <code>custom</code> (to show the options configured in your user settings). <code>datatype</code> must be the type of data your limits are choosing from: <code>name</code> (business name), <code>city</code>, <code>state</code>, <code>country</code>, <code>zip</code> (postal code), or <code>region</code>.','my-calendar'); ?> 
    99 </p> 
     95    <?php _e('List of event locations, as a list of links or as a select form. <code>show</code> is either <code>list</code> or <code>form</code>, <code>type</code> is <code>saved</code> (to show items from stored locations), or <code>custom</code> (to show options configured in location settings). <code>datatype</code> must be the type of data your limits are using: <code>name</code> (business name), <code>city</code>, <code>state</code>, <code>country</code>, <code>zip</code> (postal code), or <code>region</code>.','my-calendar'); ?> 
     96</p> 
     97<p class="example"><code>[my_calendar_categories show="list"]</code></p> 
     98<p> 
     99    <?php _e('List of event categories, either as a list of links or as a select dropdown form. The <code>show</code> attribute can either be <code>list</code> or <code>form</code>.','my-calendar'); ?> 
     100</p> 
     101<p class="example"><code>[my_calendar_access show="list"]</code></p> 
     102<p> 
     103    <?php _e('List of filterable accessibility services, either as a list of links or as a select dropdown form. The <code>show</code> attribute can either be <code>list</code> or <code>form</code>.','my-calendar'); ?> 
     104</p> 
     105<h4><?php _e( 'Information Listing Shortcodes', 'my-calendar' ); ?></h4> 
     106 
    100107<p class="example"><code>[my_calendar_show_locations datatype="" template=""]</code></p> 
    101108<p> 
    102     <?php _e('Display a list of locations. The <code>datatype</code> is the type of data displayed; all lists will include a link to the map of that location. In addition to basic location information as in the above shortcode, you can also use "hcard" to display all available location information.','my-calendar'); ?> 
    103     <?php _e('Use the <code>template</code> attribute to show your customized set of data. Sorted by the <code>datatype</code> value.','my-calendar'); ?> 
     109    <?php _e('List of locations. <code>datatype</code> is the type of data displayed; all lists include a link to the map to that location. In addition to basic location information as in the above shortcode, you can also use "hcard" to display all available location information.','my-calendar'); ?> 
     110    <?php _e('Use <code>template</code> to show customized data, sorted by the <code>datatype</code> value.','my-calendar'); ?> 
    104111    </p> 
    105 <p class="example"><code>[my_calendar_categories show="list"]</code></p> 
    106 <p> 
    107     <?php _e('List of event categories, either as a list of links or as a select dropdown form. The <code>show</code> attribute can either be <code>list</code> or <code>form</code>.','my-calendar'); ?> 
    108 </p> 
    109 <p class="example"><code>[my_calendar_access show="list"]</code></p> 
    110 <p> 
    111     <?php _e('List of filterable accessibility services, either as a list of links or as a select dropdown form. The <code>show</code> attribute can either be <code>list</code> or <code>form</code>.','my-calendar'); ?> 
    112 </p>     
     112     
    113113</div> 
    114114</div> 
  • my-calendar/trunk/my-calendar-settings.php

    r859129 r860300  
    33 
    44function mc_settings_field( $name, $label, $default='', $note='', $atts=array( 'size'=>'30' ), $type='text' ) { 
    5     $options = ''; 
     5    $options = $attributes = ''; 
    66    if ( is_array( $atts ) && !empty( $atts ) ) { 
    77        foreach ( $atts as $key => $value ) { 
     
    562562        foreach ( $order as $k) { 
    563563            $k = trim($k); 
    564             $v = $nav_elements[$k]; 
    565             $inserted[$k] = $v; 
    566             echo "<li class='ui-state-default mc-$k'><button class='up'><i class='dashicons dashicons-arrow-up'></i><span class='screen-reader-text'>Up</span></button> <button class='down'><i class='dashicons dashicons-arrow-down'></i><span class='screen-reader-text'>Down</span></button> <code>$k</code> $v <input type='hidden' name='mc_nav[]' value='$k' /></li>"; 
     564            $v = ( isset( $nav_elements[$k] ) ) ? $nav_elements[$k] : false; 
     565            if ( $v !== false ) { 
     566                $inserted[$k] = $v; 
     567                echo "<li class='ui-state-default mc-$k'><button class='up'><i class='dashicons dashicons-arrow-up'></i><span class='screen-reader-text'>Up</span></button> <button class='down'><i class='dashicons dashicons-arrow-down'></i><span class='screen-reader-text'>Down</span></button> <code>$k</code> $v <input type='hidden' name='mc_nav[]' value='$k' /></li>"; 
     568            } 
    567569        } 
    568570        $missed = array_diff( $nav_elements, $inserted ); 
  • my-calendar/trunk/my-calendar-widgets.php

    r857615 r860300  
    449449                                    if ( my_calendar_date_comp( $beginning,$current ) ) {    
    450450                                        if ( !$same_event && !$same_group ) { $past++; } else { $extra++; } 
    451                                     } else if ( my_calendar_date_equal( $beginning,$current ) ) {   
     451                                    } else if ( my_calendar_date_equal( $beginning, $current ) ) {   
    452452                                        $present = 1; 
    453453                                        if ( $show_today == 'yes' ) { $extra++; } 
    454                                     } else { 
    455                                         if ( !$same_event && !$same_group ) { $future++;  } else { $extra++;} 
     454                                    } else if ( !my_calendar_date_comp( $end,$current ) ) { 
     455                                        if ( !$same_event && !$same_group ) { $future++;  } // else { $extra++; } // why was this here? 
    456456                                    } 
    457457                                    $last_events[] = $e->occur_id; 
Note: See TracChangeset for help on using the changeset viewer.