| @@ -43,10 +43,9 @@ | ||
| 43 | 43 | */ |
| 44 | 44 | public static function print_snippets() { |
| 45 | 45 | |
| 46 | 46 | // Check load scripts setting to load script on perticular page. |
| 47 | - $page_settings = get_option( 'wpsc-gs-page-settings' ); | |
| 48 | - if ( ! is_admin() && $page_settings['load-scripts'] == 'custom' && ! in_array( get_the_id(), $page_settings['load-script-pages'] ) ) { | |
| 47 | + if ( ! is_admin() && ! WPSC_Functions::is_load_scripts_page() ) { | |
| 49 | 48 | return; |
| 50 | 49 | } |
| 51 | 50 | ?> |
| 52 | 51 | <!-- Modal Pop-up --> |
| @@ -75,10 +74,9 @@ | ||
| 75 | 74 | */ |
| 76 | 75 | public static function js_events() { |
| 77 | 76 | |
| 78 | 77 | // Check load scripts setting to load script on perticular page. |
| 79 | - $page_settings = get_option( 'wpsc-gs-page-settings' ); | |
| 80 | - if ( ! is_admin() && $page_settings['load-scripts'] == 'custom' && ! in_array( get_the_id(), $page_settings['load-script-pages'] ) ) { | |
| 78 | + if ( ! is_admin() && ! WPSC_Functions::is_load_scripts_page() ) { | |
| 81 | 79 | return; |
| 82 | 80 | } |
| 83 | 81 | ?> |
| 84 | 82 | <script type="text/javascript"> |
| @@ -153,10 +151,9 @@ | ||
| 153 | 151 | */ |
| 154 | 152 | public static function dynamic_css() { |
| 155 | 153 | |
| 156 | 154 | // Check load scripts setting to load script on perticular page. |
| 157 | - $page_settings = get_option( 'wpsc-gs-page-settings' ); | |
| 158 | - if ( ! is_admin() && $page_settings['load-scripts'] == 'custom' && ! in_array( get_the_id(), $page_settings['load-script-pages'] ) ) { | |
| 155 | + if ( ! is_admin() && ! WPSC_Functions::is_load_scripts_page() ) { | |
| 159 | 156 | return; |
| 160 | 157 | } |
| 161 | 158 | |
| 162 | 159 | $general = get_option( 'wpsc-ap-general' ); |
| @@ -162,9 +159,8 @@ | ||
| 162 | 159 | $general = get_option( 'wpsc-ap-general' ); |
| 163 | 160 | $ticket_list = get_option( 'wpsc-ap-ticket-list' ); |
| 164 | 161 | $individual_ticket = get_option( 'wpsc-ap-individual-ticket' ); |
| 165 | 162 | $modal = get_option( 'wpsc-ap-modal' ); |
| 166 | - $agent_collision = get_option( 'wpsc-ap-agent-collision' ); | |
| 167 | 163 | |
| 168 | 164 | ?> |
| 169 | 165 | <style type="text/css"> |
| 170 | 166 | .wpsc-modal .overlay, |
| @@ -345,14 +341,8 @@ | ||
| 345 | 341 | .wpsc-popover-menu > .wpsc-reply-close:hover { |
| 346 | 342 | background-color: <?php echo esc_attr( $general['primary-color'] ); ?>; |
| 347 | 343 | } |
| 348 | 344 | |
| 349 | - /* Agent Collision */ | |
| 350 | - .wpsc-ac-agent { | |
| 351 | - color: <?php echo esc_attr( $agent_collision['header-text-color'] ); ?>; | |
| 352 | - background-color: <?php echo esc_attr( $agent_collision['header-bg-color'] ); ?>; | |
| 353 | - } | |
| 354 | - | |
| 355 | 345 | /* Ticket tags */ |
| 356 | 346 | .wpsc-add-ticket-tag { |
| 357 | 347 | position: relative; |
| 358 | 348 | display: flex; |
| @@ -421,8 +411,9 @@ | ||
| 421 | 411 | $localizations['translations']['warning_message'] = html_entity_decode( esc_attr__( 'There is unposted text in the reply area. Are you sure you want to discard and proceed?', 'supportcandy' ), ENT_QUOTES ); |
| 422 | 412 | $localizations['translations']['incorrect_login'] = esc_attr__( 'Incorrect username or password!', 'supportcandy' ); |
| 423 | 413 | $localizations['translations']['incorrect_password'] = esc_attr__( 'Incorrect password!', 'supportcandy' ); |
| 424 | 414 | $localizations['translations']['unsername_unavailable'] = esc_attr__( 'Username is already taken!', 'supportcandy' ); |
| 415 | + $localizations['translations']['email_unavailable'] = esc_attr__( 'Email is already taken or not allowed!', 'supportcandy' ); | |
| 425 | 416 | $localizations['translations']['incorrect_email'] = esc_attr__( 'Incorrect email address!', 'supportcandy' ); |
| 426 | 417 | $localizations['translations']['copy_url'] = esc_attr__( 'Ticket URL copied!', 'supportcandy' ); |
| 427 | 418 | $localizations['translations']['invalidEmail'] = esc_attr__( 'Invalid email address!', 'supportcandy' ); |
| 428 | 419 | $localizations['translations']['customer_delete_warn'] = esc_attr__( 'Deleting a customer will permanently remove all associated customer information and tickets!', 'supportcandy' ); |
| @@ -427,8 +418,12 @@ | ||
| 427 | 418 | $localizations['translations']['invalidEmail'] = esc_attr__( 'Invalid email address!', 'supportcandy' ); |
| 428 | 419 | $localizations['translations']['customer_delete_warn'] = esc_attr__( 'Deleting a customer will permanently remove all associated customer information and tickets!', 'supportcandy' ); |
| 429 | 420 | $localizations['translations']['req_term_cond'] = esc_attr__( 'Please accept terms and conditions!', 'supportcandy' ); |
| 430 | 421 | $localizations['translations']['req_gdpr'] = esc_attr__( 'Please accept GDPR policy!', 'supportcandy' ); |
| 422 | + $localizations['translations']['delete_permanently'] = esc_attr__( 'Deleting a ticket will permanently remove all associated information and cannot be undone!', 'supportcandy' ); | |
| 423 | + $localizations['translations']['block_notifications'] = esc_attr__( 'Blocking notifications will stop all email alerts for this ticket.', 'supportcandy' ); | |
| 424 | + $localizations['translations']['unblock_notifications'] = esc_attr__( 'Unblocking notifications will resume email alerts for this ticket.', 'supportcandy' ); | |
| 425 | + $localizations['translations']['unauthorized_value'] = esc_attr__( 'Unauthorized value!', 'supportcandy' ); | |
| 431 | 426 | return $localizations; |
| 432 | 427 | } |
| 433 | 428 | |
| 434 | 429 | /** |
| @@ -438,10 +433,9 @@ | ||
| 438 | 433 | */ |
| 439 | 434 | public static function js_frontend() { |
| 440 | 435 | |
| 441 | 436 | // Check load scripts setting to load script on perticular page. |
| 442 | - $page_settings = get_option( 'wpsc-gs-page-settings' ); | |
| 443 | - if ( ! is_admin() && $page_settings['load-scripts'] == 'custom' && ! in_array( get_the_id(), $page_settings['load-script-pages'] ) ) { | |
| 437 | + if ( ! is_admin() && ! WPSC_Functions::is_load_scripts_page() ) { | |
| 444 | 438 | return; |
| 445 | 439 | } |
| 446 | 440 | ?> |
| 447 | 441 | <script> |