PluginProbe
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent / 3.5.2
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent v3.5.2
3.5.4 3.5.3 3.5.2 3.5.1 3.4.9 3.5.0 3.4.8 3.4.7 trunk 2.3.1 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6
supportcandy / includes / admin / ai-assistant / class-wpsc-ai-frontend.php

class-wpsc-ai-frontend.php in SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent 3.5.2, at includes/admin/ai-assistant/class-wpsc-ai-frontend.php

48 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly!
4 }
5
6 if ( ! class_exists( 'WPSC_Ai_Frontend' ) ) :
7
8 final class WPSC_Ai_Frontend {
9
10 /**
11 * Initialize this class
12 *
13 * @return void
14 */
15 public static function init() {
16
17 // load scripts & styles.
18 add_action( 'wpsc_js_frontend', array( __CLASS__, 'frontend_scripts' ) );
19 add_action( 'wpsc_css_frontend', array( __CLASS__, 'frontend_styles' ) );
20 }
21
22 /**
23 * Frontend scripts
24 *
25 * @return void
26 */
27 public static function frontend_scripts() {
28
29 echo file_get_contents( WPSC_ABSPATH . 'asset/js/ai-assistant/script.js' ) . PHP_EOL . PHP_EOL; // phpcs:ignore
30 }
31
32 /**
33 * Frontend styles
34 *
35 * @return void
36 */
37 public static function frontend_styles() {
38
39 if ( is_rtl() ) {
40 echo file_get_contents( WPSC_ABSPATH . 'asset/css/ai-assistant/public-rtl.css' ) . PHP_EOL . PHP_EOL; // phpcs:ignore
41 } else {
42 echo file_get_contents( WPSC_ABSPATH . 'asset/css/ai-assistant/public.css' ) . PHP_EOL . PHP_EOL; // phpcs:ignore
43 }
44 }
45 }
46 endif;
47 WPSC_Ai_Frontend::init();
48