Plugin Directory

Changeset 3487626


Ignore:
Timestamp:
03/21/2026 06:59:04 AM (2 weeks ago)
Author:
konceptwise
Message:

performance improvement

Location:
authyo-otp-for-contact-form-7/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • authyo-otp-for-contact-form-7/trunk/assets/css/deactivation.css

    r3393611 r3487626  
    126126}
    127127
     128/* Contact Info Input */
     129.authyo-cf7-deactivation-contact-wrapper {
     130    margin-bottom: 20px;
     131}
     132
     133.authyo-cf7-deactivation-contact-label {
     134    margin: 0 0 10px 0;
     135    font-size: 13px;
     136    color: #50575e;
     137    font-weight: 500;
     138}
     139
     140.authyo-cf7-deactivation-input {
     141    width: 100%;
     142    padding: 10px;
     143    border: 1px solid #ddd;
     144    border-radius: 4px;
     145    font-size: 14px;
     146    box-sizing: border-box;
     147}
     148
     149.authyo-cf7-deactivation-input:focus {
     150    outline: none;
     151    border-color: #2271b1;
     152    box-shadow: 0 0 0 1px #2271b1;
     153}
     154
    128155/* Actions */
    129156.authyo-cf7-deactivation-actions {
  • authyo-otp-for-contact-form-7/trunk/assets/js/deactivation.js

    r3395581 r3487626  
    6565                                        }),
    6666                                        $('<div>', {
     67                                            class: 'authyo-cf7-deactivation-contact-wrapper',
     68                                            html: [
     69                                                $('<p>', {
     70                                                    class: 'authyo-cf7-deactivation-contact-label',
     71                                                    text: DEACT.i18n.contact_label
     72                                                }),
     73                                                $('<input>', {
     74                                                    type: 'text',
     75                                                    id: 'authyo-cf7-deactivation-contact',
     76                                                    name: 'contact_info',
     77                                                    class: 'authyo-cf7-deactivation-input',
     78                                                    placeholder: DEACT.i18n.contact_placeholder
     79                                                })
     80                                            ]
     81                                        }),
     82                                        $('<div>', {
    6783                                            class: 'authyo-cf7-deactivation-actions',
    6884                                            html: [
     
    164180   
    165181    // Submit feedback (non-blocking - fire and forget)
    166     function submitFeedback(reason, details, callback) {
     182    function submitFeedback(reason, details, contactInfo, callback) {
    167183        const data = {
    168184            action: 'authyo_cf7_submit_deactivation_feedback',
    169185            nonce: DEACT.nonce,
    170186            reason: reason,
    171             details: details || ''
     187            details: details || '',
     188            contact_info: contactInfo || ''
    172189        };
     190
     191        // Merge contact_info into data if provided
     192        if (typeof reason === 'object') {
     193            // This is for the REST API path if reason is an object
     194        }
    173195       
    174196        // Make non-blocking request - don't wait for response
     
    181203                data: {
    182204                    reason: reason,
    183                     details: details || ''
     205                    details: details || '',
     206                    contact_info: data.contact_info
    184207                }
    185208            }).catch(function(error) {
     
    276299           
    277300            const details = selectedReason === 'other' ? $('#authyo-cf7-deactivation-other').val().trim() : '';
     301            const contactInfo = $('#authyo-cf7-deactivation-contact').val().trim();
    278302           
    279303            // Validate "Other" input if selected
     
    285309           
    286310            // Submit feedback (non-blocking)
    287             submitFeedback(selectedReason, details, function(success) {
     311            submitFeedback(selectedReason, details, contactInfo, function(success) {
    288312                // Hide form, show thank you message
    289313                $('#authyo-cf7-deactivation-form').hide();
     
    299323            e.preventDefault();
    300324           
     325            const contactInfo = $('#authyo-cf7-deactivation-contact').val().trim();
     326           
    301327            // Submit skipped feedback (non-blocking) and proceed immediately
    302             submitFeedback('skipped', '', function() {
     328            submitFeedback('skipped', '', contactInfo, function() {
    303329                // Proceed with deactivation immediately
    304330                performDeactivation();
  • authyo-otp-for-contact-form-7/trunk/authyo-otp-for-contact-form-7.php

    r3481798 r3487626  
    44 * Plugin URI:  https://wordpress.org/plugins/authyo-otp-for-contact-form-7/
    55 * Description: Adds OTP verification via Authyo (Email, SMS, WhatsApp, Voice Call) to Contact Form 7 submissions for secure form validation.
    6  * Version:     1.0.20
     6 * Version:     1.0.21
    77 * Author:      Authyo
    88 * Author URI:  https://authyo.io/
     
    1818    exit;
    1919
    20 define('AUTHYO_CF7_VERSION', '1.0.20');
     20define('AUTHYO_CF7_VERSION', '1.0.21');
    2121define('AUTHYO_CF7_FILE', __FILE__);
    2222define('AUTHYO_CF7_PATH', plugin_dir_path(__FILE__));
  • authyo-otp-for-contact-form-7/trunk/includes/class-authyo-deactivation.php

    r3442319 r3487626  
    138138                'reason_other' => __('Other (please share below)', 'authyo-otp-for-contact-form-7'),
    139139                'other_placeholder' => __('Please share your feedback...', 'authyo-otp-for-contact-form-7'),
     140                'contact_placeholder' => __('Email or Phone (Optional)', 'authyo-otp-for-contact-form-7'),
     141                'contact_label' => __("If you don't mind, you can share your contact information so we can get in touch with you for better support", 'authyo-otp-for-contact-form-7'),
    140142                'skip' => __('Skip', 'authyo-otp-for-contact-form-7'),
    141143                'submit' => __('Submit & Deactivate', 'authyo-otp-for-contact-form-7'),
     
    227229        $reason = isset($_POST['reason']) ? sanitize_text_field(wp_unslash($_POST['reason'])) : 'skipped';
    228230        $details = isset($_POST['details']) ? sanitize_textarea_field(wp_unslash($_POST['details'])) : '';
     231        $contact_info = isset($_POST['contact_info']) ? sanitize_text_field(wp_unslash($_POST['contact_info'])) : '';
    229232
    230233        // Send to feedback API
    231         $result = $this->send_feedback_to_api($reason, $details);
     234        $result = $this->send_feedback_to_api($reason, $details, $contact_info);
    232235
    233236        if (is_wp_error($result)) {
     
    253256        $reason = isset($params['reason']) ? sanitize_text_field($params['reason']) : 'skipped';
    254257        $details = isset($params['details']) ? sanitize_textarea_field($params['details']) : '';
     258        $contact_info = isset($params['contact_info']) ? sanitize_text_field($params['contact_info']) : '';
    255259
    256260        // Send to feedback API
    257         $result = $this->send_feedback_to_api($reason, $details);
     261        $result = $this->send_feedback_to_api($reason, $details, $contact_info);
    258262
    259263        if (is_wp_error($result)) {
     
    395399     * Send feedback data to the feedback API
    396400     */
    397     private function send_feedback_to_api($reason, $details = '')
     401    private function send_feedback_to_api($reason, $details = '', $contact_info = '')
    398402    {
    399403        // Get app_id from settings - try multiple methods to ensure we get it
     
    441445                'reason' => $reason,
    442446                'details' => $details,
     447                'contact_info' => $contact_info,
    443448                'plugin' => self::PLUGIN_SLUG,
    444449                'version' => AUTHYO_CF7_VERSION,
  • authyo-otp-for-contact-form-7/trunk/readme.txt

    r3481798 r3487626  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.0.20
     7Stable tag: 1.0.21
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8888
    8989== Changelog ==
     90= 1.0.21 =
     91* Improvement: performance improvement
     92
    9093= 1.0.20 =
    9194* UI/UX: Integrated "Skip Verification" button into the method selection row.-
Note: See TracChangeset for help on using the changeset viewer.