WordPress.org

Plugin Directory

Changeset 781554


Ignore:
Timestamp:
10/02/13 23:50:45 (7 months ago)
Author:
joedolson
Message:

dev 2.2.10

File:
1 edited

Legend:

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

    r781551 r781554  
    135135        wp_enqueue_style( 'my-calendar-admin-style' ); 
    136136    } 
     137    $this_post = $wp_query->get_queried_object(); 
     138    $id = ( is_object($this_post) && isset( $this_post->ID ) ) ? $this_post->ID : false; 
     139    $js_array = ( get_option( 'mc_show_js' ) != '' ) ? explode( ",",get_option( 'mc_show_js' ) ) : array() ; 
     140    $css_array = ( get_option( 'mc_show_css' ) != '' ) ? explode( ",",get_option( 'mc_show_css' ) ) : array() ;  
     141    // check whether any scripts are actually enabled. 
     142    if ( get_option('mc_calendar_javascript') != 1 || get_option('mc_list_javascript') != 1 || get_option('mc_mini_javascript') != 1 || get_option('mc_ajax_javascript') != 1 ) { 
     143        if ( @in_array( $id, $js_array ) || get_option( 'mc_show_js' ) == '' ) { 
     144            wp_enqueue_script( 'jquery' ); 
     145        } 
     146    } 
    137147    if ( get_option('mc_use_styles') != 'true' ) { 
    138         $this_post = $wp_query->get_queried_object(); 
    139         $id = ( is_object($this_post) && isset( $this_post->ID ) ) ? $this_post->ID : false; 
    140         $array = ( get_option( 'mc_show_css' ) != '' ) ? explode( ",",get_option( 'mc_show_css' ) ) : array() ; 
    141         if ( @in_array( $id, $array ) || get_option( 'mc_show_css' ) == '' ) { 
     148        if ( @in_array( $id, $css_array ) || get_option( 'mc_show_css' ) == '' ) { 
    142149            wp_enqueue_style( 'my-calendar-style' ); 
    143150        } 
     
    10131020} 
    10141021 
    1015 function mc_enqueue() { 
    1016 global $wp_query; 
    1017     if ( get_option('mc_calendar_javascript') != 1 || get_option('mc_list_javascript') != 1 || get_option('mc_mini_javascript') != 1 || get_option('mc_ajax_javascript') != 1 ) { 
    1018         wp_enqueue_script('jquery'); 
    1019     } 
    1020 } 
    1021  
    10221022function mc_month_comparison($month) { 
    10231023    $current_month = date("n", current_time('timestamp')); 
Note: See TracChangeset for help on using the changeset viewer.