array($this, 'sanitize_settings') )); add_settings_section( 'advcntbtn_general_section', __('General Settings', 'advanced-contact-button'), null, 'advanced-contact-button' ); // Position Settings add_settings_field( 'advcntbtn_position', __('Icons Position', 'advanced-contact-button'), array($this, 'advcntbtn_render_position_field'), 'advanced-contact-button', 'advcntbtn_general_section' ); // Style Settings add_settings_field( 'advcntbtn_style', __('Icon Style', 'advanced-contact-button'), array($this, 'advcntbtn_render_style_field'), 'advanced-contact-button', 'advcntbtn_general_section' ); // Icon Size Settings add_settings_field( 'advcntbtn_icon_size', __('Icon Size', 'advanced-contact-button'), array($this, 'advcntbtn_render_icon_size_field'), 'advanced-contact-button', 'advcntbtn_general_section' ); // Text Size Settings add_settings_field( 'advcntbtn_text_size', __('Text Size', 'advanced-contact-button'), array($this, 'advcntbtn_render_text_size_field'), 'advanced-contact-button', 'advcntbtn_general_section' ); // Call Settings add_settings_field( 'advcntbtn_call', __('Call Settings', 'advanced-contact-button'), array($this, 'advcntbtn_render_call_fields'), 'advanced-contact-button', 'advcntbtn_general_section' ); // Email Settings add_settings_field( 'advcntbtn_email', __('Email Settings', 'advanced-contact-button'), array($this, 'advcntbtn_render_email_fields'), 'advanced-contact-button', 'advcntbtn_general_section' ); // WhatsApp Settings add_settings_field( 'advcntbtn_whatsapp', __('WhatsApp Settings', 'advanced-contact-button'), array($this, 'advcntbtn_render_whatsapp_fields'), 'advanced-contact-button', 'advcntbtn_general_section' ); // WeChat Settings add_settings_field( 'advcntbtn_wechat', __('WeChat Settings', 'advanced-contact-button'), array($this, 'advcntbtn_render_wechat_fields'), 'advanced-contact-button', 'advcntbtn_general_section' ); } public function advcntbtn_render_settings_page() { if (!current_user_can('manage_options')) { return; } ?>





'; // Call Button if (isset($options['call_enabled']) && !empty($options['call_number'])) { echo ''; echo ''; if ($style === 'icon-text') { echo '' . esc_html($options['call_text']) . ''; } echo ''; } // Email Button if (isset($options['email_enabled']) && !empty($options['email_address'])) { echo ''; echo ''; if ($style === 'icon-text') { echo '' . esc_html($options['email_text']) . ''; } echo ''; } // WhatsApp Button if (isset($options['whatsapp_enabled']) && !empty($options['whatsapp_number'])) { $whatsapp_number = preg_replace('/[^0-9]/', '', $options['whatsapp_number']); echo ''; echo ''; if ($style === 'icon-text') { echo '' . esc_html($options['whatsapp_text']) . ''; } echo ''; } // WeChat Button if (isset($options['wechat_enabled']) && !empty($options['wechat_qrcode'])) { echo '
'; echo ''; if ($style === 'icon-text') { echo '' . esc_html($options['wechat_text']) . ''; } echo '
'; echo 'WeChat QR Code'; echo '
'; echo '
'; } echo ''; } } ADVCNTBTN_Main::get_instance();