| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly |
| 4 |
} |
| 5 |
|
| 6 |
wp_enqueue_script('jquery'); |
| 7 |
wp_enqueue_script('jquery-ui-core'); |
| 8 |
wp_enqueue_script('jquery-ui-autocomplete', '', array('jquery-ui-widget', 'jquery-ui-position'), '1.8.6'); |
| 9 |
wp_enqueue_script( 'jquery-ui-datepicker' ); |
| 10 |
wp_enqueue_editor(); |
| 11 |
|
| 12 |
wp_enqueue_style('wpsc-iso-css'); |
| 13 |
wp_enqueue_style('wpsc-fa-css'); |
| 14 |
wp_enqueue_style('wpsc-jquery-ui'); |
| 15 |
wp_enqueue_style('wpsc-public-css'); |
| 16 |
wp_enqueue_style('wpsc-admin-css'); |
| 17 |
wp_enqueue_style('wpsc-modal-css'); |
| 18 |
|
| 19 |
wp_enqueue_script('wpsc-dtp-js'); |
| 20 |
wp_enqueue_style('wpsc-dtp-css'); |
| 21 |
wp_enqueue_script( 'jquery-ui-slider' ); |
| 22 |
|
| 23 |
wp_enqueue_script('wpsc-admin'); |
| 24 |
wp_enqueue_script('wpsc-public'); |
| 25 |
wp_enqueue_script('wpsc-modal'); |
| 26 |
|
| 27 |
wp_enqueue_script('wpsc-ui-touch-punch'); |
| 28 |
|
| 29 |
$general_appearance = get_option('wpsc_appearance_general_settings'); |
| 30 |
$wpsc_appearance_modal_window = get_option('wpsc_modal_window'); |
| 31 |
$wpsc_ct_url = get_option('wpsc_new_ticket_btn_url'); |
| 32 |
?> |
| 33 |
|
| 34 |
<div class="wpsc-iso"> |
| 35 |
|
| 36 |
<div id="wpsc_tickets_container" class="row" style="background-color:<?php echo esc_attr($general_appearance['wpsc_bg_color'])?> !important;color:<?php echo esc_attr($general_appearance['wpsc_text_color'])?> !important; border-color:<?php echo esc_attr($general_appearance['wpsc_action_bar_color'])?> !important;"></div><?php |
| 37 |
if(strlen($wpsc_ct_url)){?> |
| 38 |
<input type="hidden" id="wpsc_ctu" value="<?php echo esc_attr($wpsc_ct_url)?>"><?php |
| 39 |
}?> |
| 40 |
|
| 41 |
<div id="wpsc_alert_success" class="alert alert-success wpsc_alert" style="display:none;" role="alert"> |
| 42 |
<i class="fa fa-check-circle"></i> <span class="wpsc_alert_text"></span> |
| 43 |
</div> |
| 44 |
|
| 45 |
<div id="wpsc_alert_error" class="alert alert-danger wpsc_alert" style="display:none;" role="alert"> |
| 46 |
<i class="fa fa-exclamation-triangle"></i> <span class="wpsc_alert_text"></span> |
| 47 |
</div> |
| 48 |
|
| 49 |
</div> |
| 50 |
|
| 51 |
<!-- Pop-up snippet start --> |
| 52 |
<div id="wpsc_popup_background" style="display:none;"></div> |
| 53 |
<div id="wpsc_popup_container" style="display:none;"> |
| 54 |
<div class="wpsc-iso"> |
| 55 |
<div class="row"> |
| 56 |
<div id="wpsc_popup" class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3"> |
| 57 |
<div id="wpsc_popup_title" class="row" style="background-color:<?php echo esc_attr($wpsc_appearance_modal_window['wpsc_header_bg_color'])?> !important;color:<?php echo esc_attr($wpsc_appearance_modal_window['wpsc_header_text_color'])?> !important;" ><h3><?php _e('Modal Title','supportcandy');?></h3></div> |
| 58 |
<div id="wpsc_popup_body" class="row"><?php _e('I am body!','supportcandy');?></div> |
| 59 |
<div id="wpsc_popup_footer" class="row" style="background-color:<?php echo esc_attr($wpsc_appearance_modal_window['wpsc_footer_bg_color'])?> !important;"> |
| 60 |
<button type="button" class="btn wpsc_popup_close"><?php _e('Close','supportcandy');?></button> |
| 61 |
<button type="button" class="btn wpsc_popup_action"><?php _e('Save Changes','supportcandy');?></button> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
</div> |
| 65 |
</div> |
| 66 |
</div> |
| 67 |
<!-- Pop-up snippet end --> |
| 68 |
|
| 69 |
<?php |
| 70 |
add_action('wp_footer', 'wpsc_page_inline_script', 99999999999999999999); |
| 71 |
global $attrs; |
| 72 |
$page = isset($attr['page']) ? sanitize_text_field($attr['page']) : 'init'; |
| 73 |
$page = !preg_match('/[^A-Za-z0-9]/', $page) ? $page : 'init';?> |
| 74 |
<script> |
| 75 |
var wpsc_setting_action = '<?php echo esc_attr($page)?>'; |
| 76 |
</script> |
| 77 |
<?php |
| 78 |
|
| 79 |
do_action('wpsc_after_shortcode_loaded'); |
| 80 |
if(!function_exists('wpsc_page_inline_script')) { |
| 81 |
function wpsc_page_inline_script() {?> |
| 82 |
<script> |
| 83 |
|
| 84 |
<?php |
| 85 |
$url_attrs = array(); |
| 86 |
foreach ($_GET as $key => $value) { |
| 87 |
|
| 88 |
$key = sanitize_text_field($key); |
| 89 |
$value = sanitize_text_field($value); |
| 90 |
$url_attrs[$key] = $value; |
| 91 |
} |
| 92 |
?> |
| 93 |
var attrs = <?php echo wp_json_encode($url_attrs)?>; |
| 94 |
jQuery(document).ready(function(){ |
| 95 |
wpsc_init(wpsc_setting_action, attrs); |
| 96 |
}); |
| 97 |
</script> |
| 98 |
<?php |
| 99 |
} |
| 100 |
} |
| 101 |
|
| 102 |
$active_theme = wp_get_theme(); |
| 103 |
if($active_theme->exists()){ |
| 104 |
include WPSC_ABSPATH . 'includes/theme_compatibility_style.php'; |
| 105 |
} |
| 106 |
?> |