$shopid, 'primaryid' => $accessibility_primaryid); $content = $this->api->call('/NewGetShopData', $data, 'get'); $has_content = !empty($content); if (!is_array($content)) { $content = []; } if (!isset($content['data']) || !is_array($content['data'])) { $content['data'] = []; } $shop_text_defaults = [ 'keybaord_nav_switch' => 0, 'cursor_switch' => 0, 'desaturate_switch' => 0, 'contrast_switch' => 0, 'bigger_text_switch' => 0, 'highlight_link_switch' => 0, 'readable_fonts_switch' => 0, 'reading_mask_switch' => 0, 'highlight_titles_switch' => 0, 'text_magnifier_switch' => 0, 'image_alt_tooltip_switch' => 0, 'stop_animation_switch' => 0, 'word_spacing_switch' => 0, 'disable_branding_switch' => 0, 'language_variable_switch' => 0, 'virtual_keyboard_switch' => 0, 'statement_on_off_switch' => 0, 'statement_edit' => '', 'statement_link' => '', 'filter_content_switch' => 0, 'alignment_switch' => 0, 'adjust_background_colors_switch' => 0, 'useful_links_switch' => 0, 'voicecommands_switch' => 0, 'image_hide_switch' => 0, 'mute_sounds_switch' => 0, 'highlight_hover_switch' => 0, 'talk_and_type_switch' => 0, 'hover_text' => 0, 'disable_widget_sound_switch' => 0, 'text_speech_switch' => 0, 'content_scaling_switch' => 0, 'highlight_focus_switch' => 0, 'color_blind_switch' => 0, 'disable_report_problem' => 0, 'hide_search_bar' => 0, 'hide_statement' => 0, 'letter_spacing_switch' => 0, 'line_height_switch' => 0, 'adjust_text_colors_switch' => 0, 'adjust_title_colors_switch' => 0, 'gif_hide_switch' => 0, 'read_mode_switch' => 0, 'bigblack_cursor_switch' => 0, 'profile_settings_switch' => 0, ]; $content['data']['shop_text'] = wp_parse_args( (is_array($content['data']['shop_text'] ?? null) ? $content['data']['shop_text'] : []), $shop_text_defaults ); $content['data']['default_lang'] = is_array($content['data']['default_lang'] ?? null) ? $content['data']['default_lang'] : []; $content['data'] = wp_parse_args($content['data'], [ 'id' => '', 'plan' => '', 'plan_display_name' => '', 'access_by_admin' => '', 'is_installation_popup_shown' => 1, 'is_plan_select_popup_shown' => 1, ]); $primary_id = $content['data']['id']; if ($primary_id) { update_option('accessibility_primaryid', $primary_id); } $current_plan = $content['data']['plan']; // If API hasn't synced plan yet, fall back to the locally stored plan so UI doesn't stay locked. if (empty($current_plan)) { $current_plan = (string) get_option('accessibility_plan', ''); $content['data']['plan'] = $current_plan; } if ($current_plan) { update_option('accessibility_plan', $current_plan); } $member_plan = (string) $content['data']['plan_display_name']; $access_by_admin = (string) $content['data']['access_by_admin']; ?> $shopid, '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, //'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, 'disable_widget_sound_switch' => $disable_widget_sound_switch, 'hover_text' => $hover_text, 'color_blind_switch' => $color_blind_switch, 'disable_report_problem_switch' => $disable_report_problem_switch, 'hide_statement' => $hide_statement, 'hide_search_bar' => $hide_search_bar, 'disable_branding_switch' => $disable_branding_switch, 'language_variable_switch' => $language_variable_switch, 'virtual_keyboard_switch' => $virtual_keyboard_switch, 'statement_on_off_switch' => $statement_on_off_switch, 'statement_edit' => $statement_edit, 'statement_link' => $statement_link, 'adjust_background_colors_switch' => $adjust_background_colors_switch, 'adjust_text_colors_switch' => $adjust_text_colors_switch, 'adjust_title_colors_switch' => $adjust_title_colors_switch, 'filter_content_switch' => $filter_content_switch ); $returnsenddata = $this->api->call('/updateShopData', $send_data, 'post'); if ($returnsenddata['status'] == 200) { echo '
" . esc_html__('You have member access', 'accessibility-assistant') . "
"; } if (empty($current_plan)) { echo ""; _e('Unlock full functionality by upgrading to a paid plan', 'accessibility-assistant'); echo "
"; } ?>