PluginProbe
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent / trunk
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent vtrunk
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 / frontend / class-wpsc-shortcode-four.php

class-wpsc-shortcode-four.php in SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent trunk, at includes/frontend/class-wpsc-shortcode-four.php

34 lines 690 B
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_Shortcode_Four' ) ) :
7
8 final class WPSC_Shortcode_Four {
9
10 /**
11 * Initialize this class
12 */
13 public static function init() {
14
15 // register shortcode.
16 add_shortcode( 'wpsc_unresolved_ticket_count', array( __CLASS__, 'layout' ) );
17 }
18
19 /**
20 * Layout for this shortcode
21 *
22 * @param array $attrs - Shortcode attributes.
23 * @return string
24 */
25 public static function layout( $attrs ) {
26
27 $current_user = WPSC_Current_User::$current_user;
28 return $current_user->is_agent ? $current_user->agent->unresolved_count : 0;
29 }
30 }
31 endif;
32
33 WPSC_Shortcode_Four::init();
34