| @@ -886,10 +886,9 @@ | ||
| 886 | 886 | if ( isset( $_GET['page'] ) && strpos( sanitize_text_field( wp_unslash( $_GET['page'] ) ), CHART_BUILDER_NAME ) !== false ) { |
| 887 | 887 | if( !(Chart_Builder_Admin::get_max_id('charts') <= 2) ){ |
| 888 | 888 | // $this->ays_chart_sale_message20($ays_chart_builder_flag); |
| 889 | 889 | // $this->ays_chart_discounted_licenses_banner_message(); |
| 890 | - // $this->ays_chart_new_silver_bundle_message_2025($ays_chart_builder_flag); | |
| 891 | - $this->ays_chart_footer_sale_banner_2026($ays_chart_builder_flag); | |
| 890 | + $this->ays_chart_new_silver_bundle_message_2025($ays_chart_builder_flag); | |
| 892 | 891 | // $this->ays_chart_helloween_message($ays_chart_builder_flag); |
| 893 | 892 | // $this->ays_chart_christmas_message($ays_chart_builder_flag); |
| 894 | 893 | // $this->ays_chart_silver_bundle_message($ays_chart_builder_flag); |
| 895 | 894 | // $this->ays_chart_black_friday_message_2024($ays_chart_builder_flag); |
| @@ -900,326 +899,9 @@ | ||
| 900 | 899 | } |
| 901 | 900 | } |
| 902 | 901 | } |
| 903 | 902 | } |
| 904 | - public function ays_chart_footer_sale_banner_2026($ishmar){ | |
| 905 | - if($ishmar == 0 ){ | |
| 906 | - $content = array(); | |
| 907 | 903 | |
| 908 | - $chart_cta_button_link = esc_url('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-builder-free&utm_campaign=private-offer-20-off-' . CHART_BUILDER_VERSION); | |
| 909 | - | |
| 910 | - $content[] = ' | |
| 911 | - <div class="ays-chart-footer-banner-bottom-banner-wrapper" style="display: none;"> | |
| 912 | - <div class="ays-chart-footer-banner-bottom-banner-container"> | |
| 913 | - <div class="ays-chart-footer-banner-bottom-banner-content"> | |
| 914 | - <div class="ays-chart-footer-banner-bottom-banner-inner"> | |
| 915 | - <div class="ays-chart-footer-banner-bottom-banner-left"> | |
| 916 | - <div class="ays-chart-footer-banner-bottom-banner-icon"> | |
| 917 | - <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | |
| 918 | - <path d="M12 7v14"></path> | |
| 919 | - <path d="M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8"></path> | |
| 920 | - <path d="M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5"></path> | |
| 921 | - <rect x="3" y="7" width="18" height="4" rx="1"></rect> | |
| 922 | - </svg> | |
| 923 | - </div> | |
| 924 | - <span class="ays-chart-footer-banner-bottom-banner-title">'. esc_html__('Chart Builder by AYS', 'ays-chart-builder') .'</span> | |
| 925 | - </div> | |
| 926 | - <span class="ays-chart-footer-banner-bottom-banner-separator"></span> | |
| 927 | - <span class="ays-chart-footer-banner-bottom-banner-discount">'. esc_html__('20% Off', 'ays-chart-builder') .'</span> | |
| 928 | - <div class="ays-chart-footer-banner-bottom-banner-code" onclick="aysChartFooterBannerCopyToClipboard()" title="'. esc_html__('Copy Coupon Code', 'ays-chart-builder') .'"> | |
| 929 | - <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | |
| 930 | - <path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"></path> | |
| 931 | - <path d="M13 5v2"></path> | |
| 932 | - <path d="M13 17v2"></path> | |
| 933 | - <path d="M13 11v2"></path> | |
| 934 | - </svg> | |
| 935 | - <span>CHARTPRO20</span> | |
| 936 | - <button type="button" class="ays-chart-footer-banner-bottom-banner-copy" aria-label="'. esc_html__('Copy Coupon Code', 'ays-chart-builder') .'"> | |
| 937 | - <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | |
| 938 | - <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect> | |
| 939 | - <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path> | |
| 940 | - </svg> | |
| 941 | - </button> | |
| 942 | - </div> | |
| 943 | - <button type="button" class="ays-chart-footer-banner-bottom-banner-cta"> | |
| 944 | - '. esc_html__('Get Deal', 'ays-chart-builder') .' | |
| 945 | - </button> | |
| 946 | - <button type="button" class="ays-chart-footer-banner-bottom-banner-close" aria-label="'. esc_html__('Close popup', 'ays-chart-builder') .'"> | |
| 947 | - <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | |
| 948 | - <path d="M18 6 6 18"></path> | |
| 949 | - <path d="m6 6 12 12"></path> | |
| 950 | - </svg> | |
| 951 | - </button> | |
| 952 | - </div> | |
| 953 | - </div> | |
| 954 | - </div> | |
| 955 | - </div>'; | |
| 956 | - | |
| 957 | - $content[] = '<style id="ays-chart-footer-banner-styles-inline-css">'; | |
| 958 | - | |
| 959 | - $content[] = '@keyframes ays-pro-slide-up{0%{opacity:0;transform:translateY(24px)}100%{opacity:1;transform:translateY(0)}}@keyframes ays-pro-slide-down{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(24px)}}.ays-chart-footer-banner-bottom-banner-wrapper{position:fixed;bottom:0;left:0;right:0;z-index:9999;padding:0 16px 28px;text-align:center;animation:.45s cubic-bezier(.16,1,.3,1) forwards ays-pro-slide-up}.ays-chart-footer-banner-bottom-banner-wrapper.ays-pro-banner-closing{animation:.32s cubic-bezier(.16,1,.3,1) forwards ays-pro-slide-down}.ays-chart-footer-banner-bottom-banner-container{display:inline-block;max-width:100%;border-radius:16px;background:linear-gradient(90deg,#2f6bff 0,#3e7bff 100%);box-shadow:0 20px 40px -15px rgba(47,107,255,.55),0 8px 20px -10px rgba(47,107,255,.35);overflow:hidden}.ays-chart-footer-banner-bottom-banner-code,.ays-chart-footer-banner-bottom-banner-content,.ays-chart-footer-banner-bottom-banner-inner,.ays-chart-footer-banner-bottom-banner-left{display:flex;align-items:center}.ays-chart-footer-banner-bottom-banner-inner{gap:16px;padding:8px 14px 8px 10px;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}.ays-chart-footer-banner-bottom-banner-left{gap:14px}.ays-chart-footer-banner-bottom-banner-icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:48px;height:48px;border-radius:50%;background:rgba(255,255,255,.15);color:#fff}.ays-chart-footer-banner-bottom-banner-icon svg{width:24px;height:24px}.ays-chart-footer-banner-bottom-banner-discount,.ays-chart-footer-banner-bottom-banner-title{font-size:17px;font-weight:600;line-height:1.25;letter-spacing:0;white-space:nowrap;color:#fff}.ays-chart-footer-banner-bottom-banner-separator{display:block;width:1px;height:24px;background:rgba(255,255,255,.4)}.ays-chart-footer-banner-bottom-banner-code{gap:6px;border:1px dashed rgba(255,255,255,.7);border-radius:999px;padding:6px 9px;color:#fff;cursor:pointer;transition:background-color .15s,border-color .15s;display:flex;align-items:center}.ays-chart-footer-banner-bottom-banner-code:hover{background:rgba(255,255,255,.1);border-color:#fff}.ays-chart-footer-banner-bottom-banner-code button svg,.ays-chart-footer-banner-bottom-banner-code>svg{width:16px;height:16px}.ays-chart-footer-banner-bottom-banner-code span{font-size:14px;font-weight:600;line-height:1;letter-spacing:.05em;color:#fff}.ays-chart-footer-banner-bottom-banner-close{display:flex;align-items:center;justify-content:center;margin:0;padding:0;background:none;border:none;color:#fff;cursor:pointer;transition:opacity .15s}.ays-chart-footer-banner-bottom-banner-close:hover{opacity:.8}.ays-chart-footer-banner-bottom-banner-copy{display:flex;align-items:center;justify-content:center;margin:0;padding:0;background:none;border:none;color:#fff;cursor:pointer;transition:opacity .15s}.ays-chart-footer-banner-bottom-banner-copy:hover{opacity:.8}.ays-chart-footer-banner-bottom-banner-cta{display:flex;align-items:center;justify-content:center;padding:8px 16px;background:#fff;color:#2f6bff;border:none;border-radius:6px;font-weight:600;font-size:14px;cursor:pointer;transition:all .15s;margin-left:12px}.ays-chart-footer-banner-bottom-banner-cta:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(47,107,255,.3)}'; | |
| 960 | - $content[] = '</style>'; | |
| 961 | - | |
| 962 | - $content[] = '<style id="ays-chart-footer-banner-notification-css">'; | |
| 963 | - $content[] = '.ays-chart-footer-banner-copy-notification{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.9);color:#fff;padding:12px 24px;border-radius:8px;font-size:14px;z-index:10001;opacity:0;transition:opacity .3s ease;pointer-events:none}.ays-chart-footer-banner-copy-notification.show{opacity:1}'; | |
| 964 | - $content[] = '</style>'; | |
| 965 | - | |
| 966 | - $content[] = '<script>'; | |
| 967 | - | |
| 968 | - $content[] = " | |
| 969 | - /** | |
| 970 | - * Footer Banner JavaScript - ES5 Compatible | |
| 971 | - * With delayed popup and visit tracking | |
| 972 | - */ | |
| 973 | - | |
| 974 | - (function() { | |
| 975 | - 'use strict'; | |
| 976 | - | |
| 977 | - // Configuration | |
| 978 | - var STORAGE_KEY = 'ays_chart_footer_banner_data'; | |
| 979 | - var POPUP_RULES = [ | |
| 980 | - { visit: 1, delay: 10000 }, // 1st visit: 10 seconds | |
| 981 | - { visit: 2, delay: 10000 }, // 2nd visit: 10 seconds | |
| 982 | - { visit: 3, delay: 15000 }, // 3th visit: 15 seconds | |
| 983 | - { visit: 4, delay: 15000 }, // 4th visit: 15 seconds | |
| 984 | - { visit: 5, delay: 20000 }, // 5th visit: 20 seconds | |
| 985 | - { visit: 7, delay: 20000 }, // 7th visit: 20 seconds | |
| 986 | - { visit: 10, delay: 30000 } // 10th visit: 30 seconds | |
| 987 | - ]; | |
| 988 | - var MAX_SHOWS_PER_DAY = 7; | |
| 989 | - | |
| 990 | - // Wait for DOM to be ready | |
| 991 | - if (document.readyState === 'loading') { | |
| 992 | - document.addEventListener('DOMContentLoaded', initBanner); | |
| 993 | - } else { | |
| 994 | - initBanner(); | |
| 995 | - } | |
| 996 | - | |
| 997 | - function initBanner() { | |
| 998 | - var banner = document.querySelector('.ays-chart-footer-banner-bottom-banner-wrapper'); | |
| 999 | - var closeButton = document.querySelector('.ays-chart-footer-banner-bottom-banner-close'); | |
| 1000 | - var ctaButton = document.querySelector('.ays-chart-footer-banner-bottom-banner-cta'); | |
| 1001 | - | |
| 1002 | - if (!banner) { | |
| 1003 | - return; | |
| 1004 | - } | |
| 1005 | - | |
| 1006 | - // Hide banner initially | |
| 1007 | - banner.style.display = 'none'; | |
| 1008 | - | |
| 1009 | - // Get or initialize banner data | |
| 1010 | - var bannerData = getBannerData(); | |
| 1011 | - | |
| 1012 | - // Check if we need to reset daily data | |
| 1013 | - if (shouldResetData(bannerData.lastResetDate)) { | |
| 1014 | - bannerData = resetDailyData(); | |
| 1015 | - } | |
| 1016 | - | |
| 1017 | - // Increment visit count | |
| 1018 | - bannerData.visitCount++; | |
| 1019 | - saveBannerData(bannerData); | |
| 1020 | - | |
| 1021 | - // Check if banner should be shown | |
| 1022 | - var shouldShow = shouldShowBanner(bannerData); | |
| 1023 | - | |
| 1024 | - if (shouldShow.show) { | |
| 1025 | - // Show banner after delay | |
| 1026 | - setTimeout(function() { | |
| 1027 | - banner.style.display = 'block'; | |
| 1028 | - | |
| 1029 | - // Increment show count | |
| 1030 | - bannerData.showCount++; | |
| 1031 | - saveBannerData(bannerData); | |
| 1032 | - }, shouldShow.delay); | |
| 1033 | - } | |
| 1034 | - | |
| 1035 | - // Close button handler | |
| 1036 | - if (closeButton) { | |
| 1037 | - closeButton.addEventListener('click', function() { | |
| 1038 | - closeBanner(banner); | |
| 1039 | - }); | |
| 1040 | - } | |
| 1041 | - | |
| 1042 | - // CTA button handler | |
| 1043 | - if (ctaButton) { | |
| 1044 | - ctaButton.addEventListener('click', function() { | |
| 1045 | - window.open('https://ays-pro.com/wordpress/chart-builder?utm_source=dashboard&utm_medium=chart-builder-free&utm_campaign=private-offer-20-off-". CHART_BUILDER_VERSION ."', '_blank'); | |
| 1046 | - // Optionally close banner after click | |
| 1047 | - closeBanner(banner); | |
| 1048 | - }); | |
| 1049 | - } | |
| 1050 | - } | |
| 1051 | - | |
| 1052 | - /** | |
| 1053 | - * Get banner data from localStorage | |
| 1054 | - */ | |
| 1055 | - function getBannerData() { | |
| 1056 | - try { | |
| 1057 | - var data = localStorage.getItem(STORAGE_KEY); | |
| 1058 | - if (data) { | |
| 1059 | - return JSON.parse(data); | |
| 1060 | - } | |
| 1061 | - } catch (e) { | |
| 1062 | - // localStorage not available or parsing error | |
| 1063 | - } | |
| 1064 | - | |
| 1065 | - // Return default data | |
| 1066 | - return { | |
| 1067 | - visitCount: 0, | |
| 1068 | - showCount: 0, | |
| 1069 | - lastResetDate: getTodayDate() | |
| 1070 | - }; | |
| 1071 | - } | |
| 1072 | - | |
| 1073 | - /** | |
| 1074 | - * Save banner data to localStorage | |
| 1075 | - */ | |
| 1076 | - function saveBannerData(data) { | |
| 1077 | - try { | |
| 1078 | - localStorage.setItem(STORAGE_KEY, JSON.stringify(data)); | |
| 1079 | - } catch (e) { | |
| 1080 | - // localStorage not available | |
| 1081 | - } | |
| 1082 | - } | |
| 1083 | - | |
| 1084 | - /** | |
| 1085 | - * Check if data should be reset (new day) | |
| 1086 | - */ | |
| 1087 | - function shouldResetData(lastResetDate) { | |
| 1088 | - var today = getTodayDate(); | |
| 1089 | - return lastResetDate !== today; | |
| 1090 | - } | |
| 1091 | - | |
| 1092 | - /** | |
| 1093 | - * Reset daily data | |
| 1094 | - */ | |
| 1095 | - function resetDailyData() { | |
| 1096 | - var newData = { | |
| 1097 | - visitCount: 0, | |
| 1098 | - showCount: 0, | |
| 1099 | - lastResetDate: getTodayDate() | |
| 1100 | - }; | |
| 1101 | - saveBannerData(newData); | |
| 1102 | - return newData; | |
| 1103 | - } | |
| 1104 | - | |
| 1105 | - /** | |
| 1106 | - * Get today's date as string (YYYY-MM-DD) | |
| 1107 | - */ | |
| 1108 | - function getTodayDate() { | |
| 1109 | - var date = new Date(); | |
| 1110 | - var year = date.getFullYear(); | |
| 1111 | - var month = String(date.getMonth() + 1).padStart(2, '0'); | |
| 1112 | - var day = String(date.getDate()).padStart(2, '0'); | |
| 1113 | - return year + '-' + month + '-' + day; | |
| 1114 | - } | |
| 1115 | - | |
| 1116 | - /** | |
| 1117 | - * Check if banner should be shown based on rules | |
| 1118 | - */ | |
| 1119 | - function shouldShowBanner(bannerData) { | |
| 1120 | - // Check if already shown max times today | |
| 1121 | - if (bannerData.showCount >= MAX_SHOWS_PER_DAY) { | |
| 1122 | - return { show: false, delay: 0 }; | |
| 1123 | - } | |
| 1124 | - | |
| 1125 | - // Check visit count against rules | |
| 1126 | - for (var i = 0; i < POPUP_RULES.length; i++) { | |
| 1127 | - var rule = POPUP_RULES[i]; | |
| 1128 | - if (bannerData.visitCount === rule.visit) { | |
| 1129 | - return { show: true, delay: rule.delay }; | |
| 1130 | - } | |
| 1131 | - } | |
| 1132 | - | |
| 1133 | - return { show: false, delay: 0 }; | |
| 1134 | - } | |
| 1135 | - | |
| 1136 | - /** | |
| 1137 | - * Close banner with animation | |
| 1138 | - */ | |
| 1139 | - function closeBanner(banner) { | |
| 1140 | - if (!banner) { | |
| 1141 | - return; | |
| 1142 | - } | |
| 1143 | - | |
| 1144 | - // Add closing animation class | |
| 1145 | - banner.classList.add('ays-pro-banner-closing'); | |
| 1146 | - | |
| 1147 | - // Wait for animation to complete | |
| 1148 | - setTimeout(function() { | |
| 1149 | - banner.style.display = 'none'; | |
| 1150 | - }, 400); | |
| 1151 | - } | |
| 1152 | - | |
| 1153 | - // Polyfill for String.padStart (for older browsers) | |
| 1154 | - if (!String.prototype.padStart) { | |
| 1155 | - String.prototype.padStart = function(targetLength, padString) { | |
| 1156 | - targetLength = targetLength >> 0; | |
| 1157 | - padString = String(typeof padString !== 'undefined' ? padString : ' '); | |
| 1158 | - if (this.length >= targetLength) { | |
| 1159 | - return String(this); | |
| 1160 | - } else { | |
| 1161 | - targetLength = targetLength - this.length; | |
| 1162 | - if (targetLength > padString.length) { | |
| 1163 | - padString += padString.repeat(targetLength / padString.length); | |
| 1164 | - } | |
| 1165 | - return padString.slice(0, targetLength) + String(this); | |
| 1166 | - } | |
| 1167 | - }; | |
| 1168 | - } | |
| 1169 | - })(); | |
| 1170 | - | |
| 1171 | - function aysChartFooterBannerCopyToClipboard() { | |
| 1172 | - var textarea = document.createElement('textarea'); | |
| 1173 | - textarea.value = 'CHARTPRO20'; | |
| 1174 | - textarea.style.position = 'fixed'; | |
| 1175 | - textarea.style.opacity = '0'; | |
| 1176 | - document.body.appendChild(textarea); | |
| 1177 | - | |
| 1178 | - textarea.select(); | |
| 1179 | - textarea.setSelectionRange(0, 99999); | |
| 1180 | - | |
| 1181 | - try { | |
| 1182 | - document.execCommand('copy'); | |
| 1183 | - aysChartFooterBannerShowCopyNotification('". esc_html__('Coupon code copied', 'ays-chart-builder') ."'); | |
| 1184 | - } catch (err) { | |
| 1185 | - console.error('Failed to copy text: ', err); | |
| 1186 | - } | |
| 1187 | - | |
| 1188 | - document.body.removeChild(textarea); | |
| 1189 | - } | |
| 1190 | - | |
| 1191 | - function aysChartFooterBannerShowCopyNotification(message) { | |
| 1192 | - var existingNotification = document.querySelector('.ays-chart-footer-banner-copy-notification'); | |
| 1193 | - if (existingNotification) { | |
| 1194 | - document.body.removeChild(existingNotification); | |
| 1195 | - } | |
| 1196 | - | |
| 1197 | - var notification = document.createElement('div'); | |
| 1198 | - notification.className = 'ays-chart-footer-banner-copy-notification'; | |
| 1199 | - notification.textContent = message; | |
| 1200 | - document.body.appendChild(notification); | |
| 1201 | - | |
| 1202 | - setTimeout(function() { | |
| 1203 | - notification.classList.add('show'); | |
| 1204 | - }, 10); | |
| 1205 | - | |
| 1206 | - setTimeout(function() { | |
| 1207 | - notification.classList.remove('show'); | |
| 1208 | - setTimeout(function() { | |
| 1209 | - if (notification.parentNode) { | |
| 1210 | - document.body.removeChild(notification); | |
| 1211 | - } | |
| 1212 | - }, 300); | |
| 1213 | - }, 2000); | |
| 1214 | - }"; | |
| 1215 | - | |
| 1216 | - $content[] = '</script>'; | |
| 1217 | - | |
| 1218 | - $content = implode( '', $content ); | |
| 1219 | - echo ($content); | |
| 1220 | - } | |
| 1221 | - } | |
| 1222 | 904 | public function ays_chart_dismiss_button(){ |
| 1223 | 905 | |
| 1224 | 906 | $data = array( |
| 1225 | 907 | 'status' => false, |
| @@ -3434,23 +3116,8 @@ | ||
| 3434 | 3116 | |
| 3435 | 3117 | return $get_ays_chart_banner_time; |
| 3436 | 3118 | } |
| 3437 | 3119 | |
| 3438 | - | |
| 3439 | - public function ays_chart_add_body_class( $classes ) { | |
| 3440 | - global $pagenow; | |
| 3441 | - | |
| 3442 | - if ( $pagenow === 'admin.php' ) { | |
| 3443 | - $page = isset( $_GET['page'] ) ? sanitize_key( $_GET['page'] ) : ''; | |
| 3444 | - | |
| 3445 | - if ( strpos( $page, $this->plugin_name ) === 0 ) { | |
| 3446 | - $classes .= ' ays-chart-builder-admin'; | |
| 3447 | - } | |
| 3448 | - } | |
| 3449 | - | |
| 3450 | - return $classes; | |
| 3451 | - } | |
| 3452 | - | |
| 3453 | 3120 | public function author_user_search() { |
| 3454 | 3121 | check_ajax_referer( 'cbuilder-author-user-search', 'security' ); |
| 3455 | 3122 | $params = isset($_REQUEST['params']) ? sanitize_text_field(wp_unslash($_REQUEST['params'])) : array(); |
| 3456 | 3123 | $search = isset($params['search']) && $params['search'] != '' ? sanitize_text_field( $params['search'] ) : null; |
| @@ -3737,9 +3404,8 @@ | ||
| 3737 | 3404 | $plugin_slug = array( |
| 3738 | 3405 | 'fox-lms', |
| 3739 | 3406 | 'quiz-maker', |
| 3740 | 3407 | 'survey-maker', |
| 3741 | - 'poll-maker', | |
| 3742 | 3408 | 'chart-builder', |
| 3743 | 3409 | 'ays-popup-box', |
| 3744 | 3410 | 'secure-copy-content-protection', |
| 3745 | 3411 | 'gallery-photo-gallery', |
| @@ -5241,9 +4907,8 @@ | ||
| 5241 | 4907 | $settings = $args['settings']; |
| 5242 | 4908 | |
| 5243 | 4909 | $show_title = $settings['show_title']; |
| 5244 | 4910 | $show_description = $settings['show_description']; |
| 5245 | - $enable_interactivity = $settings['enable_interactivity']; | |
| 5246 | 4911 | |
| 5247 | 4912 | ob_start(); |
| 5248 | 4913 | ?> |
| 5249 | 4914 | <div class="ays-accordion-data-main-wrap"> |
| @@ -5326,24 +4991,8 @@ | ||
| 5326 | 4991 | <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> |
| 5327 | 4992 | </label> |
| 5328 | 4993 | </div> |
| 5329 | 4994 | </div> <!-- Show description --> |
| 5330 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5331 | - <div class="col-sm-5 <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5332 | - <label for="ays-chart-option-enable-interactivity" class="form-label"> | |
| 5333 | - <?php echo esc_html(__('Enable interactivity', "chart-builder")); ?> | |
| 5334 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Decide if the chart shows events based on user actions or responds to user interaction. If not, the chart won't generate 'select' or similar interaction-based events (but will generate ready or error events), and won't show hovertext or change based on user input.","chart-builder") ); ?>"> | |
| 5335 | - <i class="ays_fa ays_fa_info_circle"></i> | |
| 5336 | - </a> | |
| 5337 | - </label> | |
| 5338 | - </div> | |
| 5339 | - <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 5340 | - <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch"> | |
| 5341 | - <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-enable-interactivity" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[enable_interactivity]" value="on" <?php echo esc_attr($enable_interactivity); ?> > | |
| 5342 | - <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> | |
| 5343 | - </label> | |
| 5344 | - </div> | |
| 5345 | - </div> <!-- Enable interactivity --> | |
| 5346 | 4995 | </div> |
| 5347 | 4996 | </div> |
| 5348 | 4997 | <?php |
| 5349 | 4998 | $content = ob_get_clean(); |
| @@ -5460,9 +5109,9 @@ | ||
| 5460 | 5109 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5461 | 5110 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5462 | 5111 | <label for="ays-chart-option-tooltip-bold"> |
| 5463 | 5112 | <?php echo esc_html(__( "Bold text", "chart-builder" )); ?> |
| 5464 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Make the tooltip text bold. Choose 'Enable' to apply bold formatting, 'Disable' for normal text, or 'Default' to use the chart's default font weight.","chart-builder") )); ?>"> | |
| 5113 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Choose when to display the results on the chart.","chart-builder") )); ?>"> | |
| 5465 | 5114 | <i class="ays_fa ays_fa_info_circle"></i> |
| 5466 | 5115 | </a> |
| 5467 | 5116 | </label> |
| 5468 | 5117 | </div> |
| @@ -5499,13 +5148,8 @@ | ||
| 5499 | 5148 | $html_name_prefix = $args['html_name_prefix']; |
| 5500 | 5149 | $settings = $args['settings']; |
| 5501 | 5150 | |
| 5502 | 5151 | $tooltip_text_color = $settings['tooltip_text_color']; |
| 5503 | - $show_color_code = $settings['show_color_code']; | |
| 5504 | - $tooltip_italic = $settings['tooltip_italic']; | |
| 5505 | - $tooltip_font_size = $settings['tooltip_font_size']; | |
| 5506 | - $tooltip_bold = $settings['tooltip_bold']; | |
| 5507 | - $tooltip_bold_options = $settings['tooltip_bold_options']; | |
| 5508 | 5152 | |
| 5509 | 5153 | ob_start(); |
| 5510 | 5154 | ?> |
| 5511 | 5155 | <div class="ays-accordion-data-main-wrap "> |
| @@ -5511,24 +5155,8 @@ | ||
| 5511 | 5155 | <div class="ays-accordion-data-main-wrap "> |
| 5512 | 5156 | <div class="<?php echo esc_attr($html_class_prefix) ?>settings-data-main-wrap"> |
| 5513 | 5157 | <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> |
| 5514 | 5158 | <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> |
| 5515 | - <label for="ays-chart-option-show-color-code"> | |
| 5516 | - <?php echo esc_html(__( "Show Color Code", "chart-builder" )); ?> | |
| 5517 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color will be displayed while clicking on a particular part of the chart.","chart-builder") ); ?>"> | |
| 5518 | - <i class="ays_fa ays_fa_info_circle"></i> | |
| 5519 | - </a> | |
| 5520 | - </label> | |
| 5521 | - </div> | |
| 5522 | - <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 5523 | - <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch"> | |
| 5524 | - <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-show-color-code" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[show_color_code]" value="on" <?php echo esc_attr($show_color_code); ?> > | |
| 5525 | - <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> | |
| 5526 | - </label> | |
| 5527 | - </div> | |
| 5528 | - </div> <!-- Show Color Code --> | |
| 5529 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5530 | - <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5531 | 5159 | <label for="ays-chart-option-tooltip-text-color"> |
| 5532 | 5160 | <?php echo esc_html(__( "Text color", "chart-builder" )); ?> |
| 5533 | 5161 | <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("The color of the tooltip text.","chart-builder") ); ?>"> |
| 5534 | 5162 | <i class="ays_fa ays_fa_info_circle"></i> |
| @@ -5538,60 +5166,8 @@ | ||
| 5538 | 5166 | <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> |
| 5539 | 5167 | <input id="ays-chart-option-tooltip-text-color" class="form-control-color <?php echo esc_attr($html_class_prefix) ?>option-color-picker" type="color" name="<?php echo esc_attr($html_name_prefix); ?>settings[tooltip_text_color]" value="<?php echo esc_attr($tooltip_text_color) ?>"> |
| 5540 | 5168 | </div> |
| 5541 | 5169 | </div> <!-- Text color --> |
| 5542 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5543 | - <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5544 | - <label for="ays-chart-option-tooltip-italic"> | |
| 5545 | - <?php echo esc_html(__( "Italic text", "chart-builder" )); ?> | |
| 5546 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr( __("Enable this option to make chart tooltip text italic.","chart-builder") ); ?>"> | |
| 5547 | - <i class="ays_fa ays_fa_info_circle"></i> | |
| 5548 | - </a> | |
| 5549 | - </label> | |
| 5550 | - </div> | |
| 5551 | - <div class="col-sm-7 py-1 <?php echo esc_attr($html_class_prefix) ?>input-align-right"> | |
| 5552 | - <label class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-switch"> | |
| 5553 | - <input class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch" id="ays-chart-option-tooltip-italic" type="checkbox" name="<?php echo esc_attr($html_name_prefix); ?>settings[tooltip_italic]" value="on" <?php echo esc_attr($tooltip_italic); ?> > | |
| 5554 | - <span class="<?php echo esc_attr($html_class_prefix) ?>toggle-switch-slider <?php echo esc_attr($html_class_prefix) ?>toggle-switch-round"></span> | |
| 5555 | - </label> | |
| 5556 | - </div> | |
| 5557 | - </div> <!-- Italic text --> | |
| 5558 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5559 | - <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5560 | - <label for="ays-chart-option-tooltip-font-size" class="form-label"> | |
| 5561 | - <?php echo esc_html(__( "Font size", "chart-builder" )); ?> | |
| 5562 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("The font size for all text within the chart tooltip, specified in pixels. Please note that if an invalid value is entered, it will revert to the default global font size.","chart-builder") )); ?>"> | |
| 5563 | - <i class="ays_fa ays_fa_info_circle"></i> | |
| 5564 | - </a> | |
| 5565 | - </label> | |
| 5566 | - </div> | |
| 5567 | - <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5568 | - <input class="ays-text-input form-control <?php echo esc_attr($html_class_prefix) ?>option-text-input" id="ays-chart-option-tooltip-font-size" type="number" name="<?php echo esc_attr($html_name_prefix); ?>settings[tooltip_font_size]" value="<?php echo esc_attr($tooltip_font_size) ?>"> | |
| 5569 | - <div class="<?php echo esc_attr($html_class_prefix) ?>option-desc-box">px</div> | |
| 5570 | - </div> | |
| 5571 | - </div> <!-- Font size --> | |
| 5572 | - <div class="form-group row mb-2 <?php echo esc_attr($html_class_prefix) ?>options-section"> | |
| 5573 | - <div class="col-sm-5 d-flex align-items-center <?php echo esc_attr($html_class_prefix) ?>option-title"> | |
| 5574 | - <label for="ays-chart-option-tooltip-bold"> | |
| 5575 | - <?php echo esc_html(__( "Bold text", "chart-builder" )); ?> | |
| 5576 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(htmlspecialchars( __("Make the tooltip text bold. Choose 'Enable' to apply bold formatting, 'Disable' for normal text, or 'Default' to use the chart's default font weight.","chart-builder") )); ?>"> | |
| 5577 | - <i class="ays_fa ays_fa_info_circle"></i> | |
| 5578 | - </a> | |
| 5579 | - </label> | |
| 5580 | - </div> | |
| 5581 | - <div class="col-sm-7 <?php echo esc_attr($html_class_prefix) ?>option-input"> | |
| 5582 | - <select class="<?php echo esc_attr($html_class_prefix) ?>option-select-input form-select" id="ays-chart-option-tooltip-bold" name="<?php echo esc_attr($html_name_prefix); ?>settings[tooltip_bold]"> | |
| 5583 | - <?php | |
| 5584 | - foreach ( $tooltip_bold_options as $option_slug => $option ): | |
| 5585 | - $selected = ( $tooltip_bold == $option_slug ) ? 'selected' : ''; | |
| 5586 | - ?> | |
| 5587 | - <option value="<?php echo esc_attr($option_slug); ?>" <?php echo esc_attr($selected); ?>><?php echo esc_html($option); ?></option> | |
| 5588 | - <?php | |
| 5589 | - endforeach; | |
| 5590 | - ?> | |
| 5591 | - </select> | |
| 5592 | - </div> | |
| 5593 | - </div> <!-- Bold text --> | |
| 5594 | 5170 | </div> |
| 5595 | 5171 | </div> |
| 5596 | 5172 | <?php |
| 5597 | 5173 | $content = ob_get_clean(); |