array( 'slug' => 'agents', 'icon' => 'headset', 'label' => esc_attr__( 'Agents', 'supportcandy' ), 'callback' => 'wpsc_get_agent_list', ), 'agent-roles' => array( 'slug' => 'agent_roles', 'icon' => 'shield', 'label' => esc_attr__( 'Agent Roles', 'supportcandy' ), 'callback' => 'wpsc_get_agent_roles', ), 'working-hrs' => array( 'slug' => 'working_hrs', 'icon' => 'clock', 'label' => esc_attr__( 'Working Hours', 'supportcandy' ), 'callback' => 'wpsc_get_agents_working_hrs', ), 'leaves' => array( 'slug' => 'leaves', 'icon' => 'calendar-times', 'label' => esc_attr__( 'Leaves', 'supportcandy' ), 'callback' => 'wpsc_get_agent_leaves', ), ) ); self::$current_section = isset( $_REQUEST['section'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['section'] ) ) : 'agents'; // phpcs:ignore } /** * Add localizations to local JS * * @param array $localizations - localizations. * @return array */ public static function localizations( $localizations ) { if ( ! self::$is_current_page ) { return $localizations; } // Humbargar Titles. $localizations['humbargar_titles'] = self::get_humbargar_titles(); // Current section. $localizations['current_section'] = self::$current_section; return $localizations; } /** * UI foundation for this screen * * @return void */ public static function layout() { ?>