$shopid,); // print_r($data); $content = assistant_api_call('/getShopData', $data, 'get'); 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 '
'; // print_r($content); // echo ''; // 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";
}
}
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,
'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 '';
}
}
}
}
// echo '';
// print_r($content['data']);
// echo '
';
// die;
?>
add(new DateInterval('P7D'));
$interval = $current_date->diff($end_date);
// echo '';
// print_r($interval);
$remaining_days = $interval->format('%r%a');
if (empty($current_plan)) {
require_once 'plan-list.php';
} else {
if ($created_at && $trial_day != 1 && $access_by_admin != '1') {
if ($interval->days <= 7 && $interval->invert == 0) {
echo "You are on a 7-day trial. " . esc_html($remaining_days) . " days remaining. Trial ends on " . esc_html($end_date->format('Y-m-d H:i:s')) . ".
";
} else {
echo "Your 7-day free trial has ended. Please subscribe to continue. Trial ended on " . esc_html($end_date->format('Y-m-d H:i:s')) . ".
";
}
}else{
echo "You have admin access
";
}
?>
Accessibility by CartCoders
pages / Settings
Settings