$shopid,); // print_r($data); $content = assistant_api_call('/getShopData', $data, 'get'); // echo '
';
// print_r($content);
// echo '
'; ?> firsttt if"; require_once 'plan-list.php'; return; } if ($content['data']['trail_day'] == '1' && $content['data']['plan']) { $subscription_content = assistant_api_call('/wordpress/checkSubscriptionAndUpdate', $data, 'post'); $subscription_status = $subscription_content['status']; // $subscription_status = 500; if ($subscription_status != '200') { require_once 'plan-list.php'; return; } } // print_r($subscription_content); // echo 'plan: ' . $content['data']['plan']; if (empty($accessibility_url)) { update_option('accessibility_url', sanitize_text_field($content['data']['url'])); } if ($content) { $access_by_admin = $content['data']['access_by_admin']; //echo 'access_by_admin'.$access_by_admin; $trial_day = $content['data']['trail_day']; $current_plan = $content['data']['plan']; $is_installation_popup_shown = $content['data']['is_installation_popup_shown']; $is_plan_select_popup_shown = $content['data']['is_plan_select_popup_shown']; if ($is_installation_popup_shown == 0 && $is_plan_select_popup_shown == 0) { require_once 'installation-popup.php'; } if ($is_plan_select_popup_shown == 0 && $trial_day == '1' && !empty($current_plan) && $is_installation_popup_shown == 1) { //echo "callled"; require_once 'thanyou-popup.php'; } if (isset($_POST['btnAdd'])) { // echo '
';
        // print_r($_POST);

        if (! isset($_POST['accessibility_nonce']) || ! wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['accessibility_nonce'])), 'accessibility_nonce')) {
            print 'Sorry, You can not update....';
            exit;
        } else {
            $widget_enable = "off";
            $button_link_status = $keybaord_nav_switch = $cursor_switch = $desaturate_switch = $contrast_switch = $bigger_text_switch = $highlight_link_switch = $readable_fonts_switch = $reading_mask_switch = $highlight_titles_switch = $text_magnifier_switch = $image_alt_tooltip_switch = $stop_animation_switch = $word_spacing_switch = 0;
            $desktop_position = $mobile_position = $backgroundcolor = $fontcolor = $iconcolor = $bottom_padding = $choose_design = "";
            $error = array();
            $jsChecked = "off";
            if (isset($_POST['jsChecked'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['jsChecked']));
                if ($widget_enable == "on") {
                    $jsChecked = "on";
                }
            }

            $button_link_status = "off";
            if (isset($_POST['enable_link'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['enable_link']));
                if ($widget_enable == "on") {
                    $button_link_status  = "on";
                }
            }

            $keybaord_nav_switch = "off";
            if (isset($_POST['keybaord_nav_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['keybaord_nav_switch']));
                if ($widget_enable == "on") {
                    $keybaord_nav_switch = "on";
                }
            }
            $cursor_switch = "off";
            if (isset($_POST['cursor_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['cursor_switch']));
                if ($widget_enable == "on") {
                    $cursor_switch = "on";
                }
            }
            $desaturate_switch = "off";
            if (isset($_POST['desaturate_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['desaturate_switch']));
                if ($widget_enable == "on") {
                    $desaturate_switch = "on";
                }
            }
            $contrast_switch = "off";
            if (isset($_POST['contrast_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['contrast_switch']));
                if ($widget_enable == "on") {
                    $contrast_switch = "on";
                }
            }
            $bigger_text_switch = "off";
            if (isset($_POST['bigger_text_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['bigger_text_switch']));
                if ($widget_enable == "on") {
                    $bigger_text_switch = "on";
                }
            }
            $highlight_link_switch = "off";
            if (isset($_POST['highlight_link_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['highlight_link_switch']));
                if ($widget_enable == "on") {
                    $highlight_link_switch = "on";
                }
            }
            $readable_fonts_switch = "off";
            if (isset($_POST['readable_fonts_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['readable_fonts_switch']));
                if ($widget_enable == "on") {
                    $readable_fonts_switch = "on";
                }
            }
            $reading_mask_switch = "off";
            if (isset($_POST['reading_mask_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['reading_mask_switch']));
                if ($widget_enable == "on") {
                    $reading_mask_switch = "on";
                }
            }
            $highlight_titles_switch = "off";
            if (isset($_POST['highlight_titles_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['highlight_titles_switch']));
                if ($widget_enable == "on") {
                    $highlight_titles_switch = "on";
                }
            }
            $text_magnifier_switch = "off";
            if (isset($_POST['text_magnifier_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['text_magnifier_switch']));
                if ($widget_enable == "on") {
                    $text_magnifier_switch = "on";
                }
            }
            $image_alt_tooltip_switch = "off";
            if (isset($_POST['image_alt_tooltip_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['image_alt_tooltip_switch']));
                if ($widget_enable == "on") {
                    $image_alt_tooltip_switch = "on";
                }
            }
            $stop_animation_switch = "off";
            if (isset($_POST['stop_animation_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['stop_animation_switch']));
                if ($widget_enable == "on") {
                    $stop_animation_switch = "on";
                }
            }
            $word_spacing_switch = "off";
            if (isset($_POST['word_spacing_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['word_spacing_switch']));
                if ($widget_enable == "on") {
                    $word_spacing_switch = "on";
                }
            }
            $letter_spacing_switch = "off";
            if (isset($_POST['letter_spacing_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['letter_spacing_switch']));
                if ($widget_enable == "on") {
                    $letter_spacing_switch = "on";
                }
            }
            $line_height_switch = "off";
            if (isset($_POST['line_height_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['line_height_switch']));
                if ($widget_enable == "on") {
                    $line_height_switch = "on";
                }
            }
            $alignment_switch = "off";
            if (isset($_POST['alignment_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['alignment_switch']));
                if ($widget_enable == "on") {
                    $alignment_switch = "on";
                }
            }
            $image_hide_switch = "off";
            if (isset($_POST['image_hide_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['image_hide_switch']));
                if ($widget_enable == "on") {
                    $image_hide_switch = "on";
                }
            }
            $text_speech_switch = "off";
            if (isset($_POST['text_speech_switch'])) {
                $widget_enable = sanitize_text_field(wp_unslash($_POST['text_speech_switch']));
                if ($widget_enable == "on") {
                    $text_speech_switch = "on";
                }
            }

            $adjust_text_colors_switch = "off";
            if (isset($_POST['adjust_text_colors_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['adjust_text_colors_switch']));
                if ($val == "on") {
                    $adjust_text_colors_switch = "on";
                }
            }

            $adjust_title_colors_switch = "off";
            if (isset($_POST['adjust_title_colors_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['adjust_title_colors_switch']));
                if ($val == "on") {
                    $adjust_title_colors_switch = "on";
                }
            }

            $adjust_background_colors_switch = "off";
            if (isset($_POST['adjust_background_colors_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['adjust_background_colors_switch']));
                if ($val == "on") {
                    $adjust_background_colors_switch = "on";
                }
            }

            // $smart_contrast_switch = "off";
            // if (isset($_POST['smart_contrast_switch'])) {
            //     $val = sanitize_text_field(wp_unslash($_POST['smart_contrast_switch']));
            //     if ($val == "on") {
            //         $smart_contrast_switch = "on";
            //     }
            // }

            $mute_sounds_switch = "off";
            if (isset($_POST['mute_sounds_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['mute_sounds_switch']));
                if ($val == "on") {
                    $mute_sounds_switch = "on";
                }
            }

            $content_scaling_switch = "off";
            if (isset($_POST['content_scaling_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['content_scaling_switch']));
                if ($val == "on") {
                    $content_scaling_switch = "on";
                }
            }

            $gif_hide_switch = "off";
            if (isset($_POST['gif_hide_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['gif_hide_switch']));
                if ($val == "on") {
                    $gif_hide_switch = "on";
                }
            }

            $read_mode_switch = "off";
            if (isset($_POST['read_mode_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['read_mode_switch']));
                if ($val == "on") {
                    $read_mode_switch = "on";
                }
            }

            $useful_links_switch = "off";
            if (isset($_POST['useful_links_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['useful_links_switch']));
                if ($val == "on") {
                    $useful_links_switch = "on";
                }
            }

            $highlight_hover_switch = "off";
            if (isset($_POST['highlight_hover_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['highlight_hover_switch']));
                if ($val == "on") {
                    $highlight_hover_switch = "on";
                }
            }

            $highlight_focus_switch = "off";
            if (isset($_POST['highlight_focus_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['highlight_focus_switch']));
                if ($val == "on") {
                    $highlight_focus_switch = "on";
                }
            }

            $bigblack_cursor_switch = "off";
            if (isset($_POST['bigblack_cursor_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['bigblack_cursor_switch']));
                if ($val == "on") {
                    $bigblack_cursor_switch = "on";
                }
            }

            $profile_settings_switch = "off";
            if (isset($_POST['profile_settings_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['profile_settings_switch']));
                if ($val == "on") {
                    $profile_settings_switch = "on";
                }
            }

            $voicecommands_switch = "off";
            if (isset($_POST['voicecommands_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['voicecommands_switch']));
                if ($val == "on") {
                    $voicecommands_switch = "on";
                }
            }

            $talk_and_type_switch = "off";
            if (isset($_POST['talk_and_type_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['talk_and_type_switch']));
                if ($val == "on") {
                    $talk_and_type_switch = "on";
                }
            }

            $color_blind_switch = "off";
            if (isset($_POST['color_blind_switch'])) {
                $val = sanitize_text_field(wp_unslash($_POST['color_blind_switch']));
                if ($val == "on") {
                    $color_blind_switch = "on";
                }
            }





            if (isset($_POST['desktop_position'])) {
                $desktop_position = sanitize_text_field(wp_unslash($_POST['desktop_position']));
            }

            if (isset($_POST['mobile_position'])) {
                $mobile_position = sanitize_text_field(wp_unslash($_POST['mobile_position']));
            }
            if (isset($_POST['backgroundcolor'])) {
                $backgroundcolor = sanitize_text_field(wp_unslash($_POST['backgroundcolor']));
            }
            if (isset($_POST['fontcolor'])) {
                $fontcolor = sanitize_text_field(wp_unslash($_POST['fontcolor']));
            }
            if (isset($_POST['iconcolor'])) {
                $iconcolor = sanitize_text_field(wp_unslash($_POST['iconcolor']));
            }
            if (isset($_POST['bottom_padding'])) {
                $bottom_padding = sanitize_text_field(wp_unslash($_POST['bottom_padding']));
            }

            if (isset($_POST['choose_design'])) {
                $choose_design = sanitize_text_field(wp_unslash($_POST['choose_design']));
            }


            $send_data = array(
                'shopid' => $shopid,
                'enable_link' => $button_link_status,
                'keybaord_nav_switch' => $keybaord_nav_switch,
                'cursor_switch' => $cursor_switch,
                'desaturate_switch' => $desaturate_switch,
                'contrast_switch' => $contrast_switch,
                'bigger_text_switch' => $bigger_text_switch,
                'highlight_link_switch' => $highlight_link_switch,
                'readable_fonts_switch' => $readable_fonts_switch,
                'reading_mask_switch' => $reading_mask_switch,
                'highlight_titles_switch' => $highlight_titles_switch,
                'text_magnifier_switch' => $text_magnifier_switch,
                'image_alt_tooltip_switch' => $image_alt_tooltip_switch,
                'stop_animation_switch' => $stop_animation_switch,
                'word_spacing_switch' => $word_spacing_switch,
                'letter_spacing_switch' => $letter_spacing_switch,
                'line_height_switch' => $line_height_switch,
                'alignment_switch' => $alignment_switch,
                'image_hide_switch' => $image_hide_switch,
                'text_speech_switch' => $text_speech_switch,
                'adjust_text_colors_switch' => $adjust_text_colors_switch,
                'adjust_title_colors_switch' => $adjust_title_colors_switch,
                'adjust_background_colors_switch' => $adjust_background_colors_switch,
                //'smart_contrast_switch' => $smart_contrast_switch,
                'mute_sounds_switch' => $mute_sounds_switch,
                'content_scaling_switch' => $content_scaling_switch,
                'gif_hide_switch' => $gif_hide_switch,
                'read_mode_switch' => $read_mode_switch,
                'useful_links_switch' => $useful_links_switch,
                'highlight_hover_switch' => $highlight_hover_switch,
                'highlight_focus_switch' => $highlight_focus_switch,
                'bigblack_cursor_switch' => $bigblack_cursor_switch,
                'profile_settings_switch' => $profile_settings_switch,
                'voicecommands_switch' => $voicecommands_switch,
                'talk_and_type_switch' => $talk_and_type_switch,
                'color_blind_switch' => $color_blind_switch,
                'position' => $desktop_position,
                'mobile_position' => $mobile_position,
                'jsChecked' => $jsChecked,
                'backgroundcolor' => $backgroundcolor,
                'fontcolor' => $fontcolor,
                'iconcolor' => $iconcolor,
                'bottom_padding' => $bottom_padding,
                'choose_design' => $choose_design,
            );

            // echo '
';
            // print_r($send_data);
            // die;
            $returnsenddata = assistant_api_call('/updateShopData', $send_data, 'post');
            // echo "
";
            // print_r($returnsenddata);
            if ($returnsenddata['status'] == 200) {

                echo '
× Success!
'; $data = array('shopid' => $returnsenddata['data']['shopid'],); $content = assistant_api_call('/getShopData', $data, 'get'); } else { echo '
× Error! '; echo esc_html($returnsenddata['messages']); echo '
'; } } } } ?> You have admin access

"; } ?>

/

/>
/>




0
25
50
75
100

/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>