Add mobile-friendly browser phone shortcode for frontend use
- Created TWP_Shortcodes class with [twp_browser_phone] shortcode - Mobile-first responsive CSS design with touch-friendly interface - Frontend JavaScript integration with Twilio Voice SDK v2 - Permission checks for logged-in users with twp_access_browser_phone capability - Haptic feedback and dark mode support - Configurable shortcode parameters (title, show_title, compact) - Updated plugin version to 2.1.0 in main file - Added comprehensive documentation to README.md Features: - Visual dialpad with DTMF support - Real-time connection status indicators - Call timer and queue management - Auto-scaling for mobile devices (320px+) - Optimized for both desktop and mobile use 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,7 @@ class TWP_Core {
|
||||
require_once TWP_PLUGIN_DIR . 'includes/class-twp-agent-groups.php';
|
||||
require_once TWP_PLUGIN_DIR . 'includes/class-twp-agent-manager.php';
|
||||
require_once TWP_PLUGIN_DIR . 'includes/class-twp-callback-manager.php';
|
||||
require_once TWP_PLUGIN_DIR . 'includes/class-twp-shortcodes.php';
|
||||
|
||||
// Admin classes
|
||||
require_once TWP_PLUGIN_DIR . 'admin/class-twp-admin.php';
|
||||
@@ -197,6 +198,9 @@ class TWP_Core {
|
||||
$this->loader->add_action('wp_ajax_twp_delete_conversation', $plugin_admin, 'ajax_delete_conversation');
|
||||
$this->loader->add_action('wp_ajax_twp_get_conversation', $plugin_admin, 'ajax_get_conversation');
|
||||
$this->loader->add_action('wp_ajax_twp_send_sms_reply', $plugin_admin, 'ajax_send_sms_reply');
|
||||
|
||||
// Frontend browser phone AJAX handlers are already covered by the admin handlers above
|
||||
// since they check permissions internally
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -210,6 +214,9 @@ class TWP_Core {
|
||||
// Initialize Agent Manager
|
||||
TWP_Agent_Manager::init();
|
||||
|
||||
// Initialize Shortcodes
|
||||
TWP_Shortcodes::init();
|
||||
|
||||
// Scheduled events
|
||||
$scheduler = new TWP_Scheduler();
|
||||
$this->loader->add_action('twp_check_schedules', $scheduler, 'check_active_schedules');
|
||||
|
Reference in New Issue
Block a user