PluginProbe
Survey Maker by AYS / 5.2.4.1
Survey Maker by AYS v5.2.4.1
5.2.4.1 5.2.4.0 5.2.3.9 5.2.3.8 5.2.3.7 5.2.3.6 5.2.3.5 5.2.3.4 5.2.3.3 5.2.3.2 5.2.3.1 5.2.3.0 5.2.2.9 5.2.2.8 5.2.2.7 5.2.2.6 5.2.2.5 5.2.2.4 5.2.2.3 5.2.2.2 5.2.2.1 5.2.2.0 5.2.1.9 5.2.1.8 5.2.0.8 All 154 releases
← All changes | admin/class-survey-maker-admin.php +98 -5 5.2.3.7 → 5.2.4.1 View file →
@@ -572,9 +572,9 @@
572 572 $this->capability,
573 573 $this->plugin_name,
574 574 array($this, 'display_plugin_surveys_page'),
575 575 SURVEY_MAKER_ADMIN_URL . '/images/icons/survey-make-menu-logo.svg',
576 - '6.21'
576 + '25.20'
577 577 );
578 578 add_action( "load-$hook_survey_maker", array( $this, 'add_tabs' ));
579 579 }
580 580
@@ -1760,15 +1760,16 @@
1760 1760
1761 1761 $ays_survey_maker_flag = intval(get_option('ays_survey_sale_btn'));
1762 1762 if( $ays_survey_maker_flag == 0 ){
1763 1763 if (isset($_GET['page']) && strpos($_GET['page'], SURVEY_MAKER_NAME) !== false) {
1764 - if(Survey_Maker_Admin::get_max_id('surveys') > 1){
1764 + // if(Survey_Maker_Admin::get_max_id('surveys') > 1){
1765 1765 // $this->ays_survey_new_halloween_bundle_message_2025($ays_survey_maker_flag);
1766 1766 // $this->ays_survey_black_friday_message($ays_survey_maker_flag);
1767 1767 // $this->ays_survey_christmas_banner_message_2025($ays_survey_maker_flag);
1768 - // $this->ays_survey_new_mega_bundle_message_2026($ays_survey_maker_flag);
1769 - $this->ays_survey_footer_sale_banner_2026($ays_survey_maker_flag);
1770 - }
1768 + $this->ays_survey_back_to_school_banner_2026($ays_survey_maker_flag);
1769 + // $this->ays_survey_footer_sale_banner_2026($ays_survey_maker_flag);
1770 +
1771 + // }
1771 1772 }
1772 1773 }
1773 1774
1774 1775 }
@@ -3753,8 +3754,100 @@
3753 3754 $content = implode( '', $content );
3754 3755 echo html_entity_decode(esc_html( $content ));
3755 3756 }
3756 3757 }
3758 +
3759 + // Back to School top banner
3760 + public function ays_survey_back_to_school_banner_2026($ishmar){
3761 + if($ishmar == 0 ){
3762 + $content = array();
3763 + $quiz_cta_button_link = esc_url('https://ays-pro.com/wordpress/survey-maker?utm_source=dashboard&utm_medium=survey-free&utm_campaign=back-to-school-sale-banner-' . SURVEY_MAKER_VERSION);
3764 + $content[] = '<div id="ays-survey-back-to-school-banner-2026" class="ays-survey-back-to-school-banner-2026 ays-survey-admin-notice notice notice-success is-dismissible ays_survey_dicount_info">';
3765 + $content[] = '<svg class="ays-survey-bts-decoration ays-survey-bts-plane" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 2 11 13"></path><path d="M22 2 15 22l-4-9-9-4Z"></path></svg>';
3766 + $content[] = '<svg class="ays-survey-bts-decoration ays-survey-bts-ruler" viewBox="0 0 36 20" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><rect x="1" y="6" width="34" height="9" rx="2"></rect><path d="M8 6v3M14 6v4M20 6v3M26 6v4"></path></svg>';
3767 + $content[] = '<svg class="ays-survey-bts-decoration ays-survey-bts-star" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="m12 2 2.6 6.6L21.5 9l-5 4.6 1.4 7-5.9-3.5L6.1 20.6l1.4-7L2.5 9l6.9-.4Z"></path></svg>';
3768 + $content[] = '<svg class="ays-survey-bts-decoration ays-survey-bts-pencil" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"></path><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg>';
3769 + $content[] = '<svg class="ays-survey-bts-decoration ays-survey-bts-wave" viewBox="0 0 96 12" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><path d="M2 8c8-8 16 8 24 0s16 8 24 0 16 8 24 0 16 8 20 2"></path></svg>';
3770 + $content[] = '<div class="ays-survey-bts-content">';
3771 + $content[] = '<div class="ays-survey-bts-offer">';
3772 + $content[] = '<img class="ays-survey-bts-handwritten" src="'. esc_url(SURVEY_MAKER_ADMIN_URL . '/images/ays-survey-back-to-school-handwritten.svg') .'" alt="Back to School Sale">';
3773 + $content[] = '<span class="ays-survey-bts-dot" aria-hidden="true"></span>';
3774 + $content[] = '<span class="ays-survey-bts-discount">'. esc_html__('20% OFF', 'survey-maker') .'</span>';
3775 + $content[] = '</div>';
3776 + $content[] = '<div class="ays-survey-bts-actions">';
3777 + $content[] = '<span class="ays-survey-bts-use-code">'. esc_html__('Use code', 'survey-maker') .'</span>';
3778 + $content[] = '<button type="button" class="ays-survey-bts-coupon" data-coupon="SCHOOL20" aria-label="'. esc_attr__('Copy coupon code SCHOOL20', 'survey-maker') .'"><span>SCHOOL20</span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button>';
3779 + $content[] = '<a href="'. esc_url($quiz_cta_button_link) .'" class="ays-survey-bts-cta" target="_blank" rel="noopener noreferrer">'. esc_html__('Upgrade Now', 'survey-maker') .'</a>';
3780 + $content[] = '</div>';
3781 + $content[] = '</div>';
3782 + $content[] = '<div class="ays-survey-bts-dismiss"><form action="" method="POST"><div id="ays-survey-dismiss-buttons-content">';
3783 + if( current_user_can( 'manage_options' ) ){
3784 + $content[] = '<button class="btn btn-link ays-button" name="ays_survey_sale_btn">'. esc_html__('Dismiss ad', 'survey-maker') .'</button>';
3785 + $content[] = wp_nonce_field( SURVEY_MAKER_NAME . '-sale-banner', SURVEY_MAKER_NAME . '-sale-banner', true, false );
3786 + }
3787 + $content[] = '</div></form></div>';
3788 + $content[] = '</div>';
3789 + $content[] = '<style id="ays-survey-back-to-school-banner-2026-inline-css">';
3790 + $content[] = '#ays-survey-back-to-school-banner-2026{box-sizing:border-box;position:relative;isolation:isolate;width:calc(100% - 20px);max-width:none;min-height:112px;margin:20px 20px 16px 0;padding:0 38px;overflow:hidden;border:1px solid #e8dcc9;border-left-width:1px;border-radius:12px;background-color:#fffdf8;background-image:radial-gradient(circle at 1px 1px,rgba(91,72,45,.09) 1px,transparent 1px),radial-gradient(120% 140% at 0 0,rgba(20,75,220,.07),transparent 55%),radial-gradient(120% 140% at 100% 100%,rgba(126,34,206,.09),transparent 55%);background-size:6px 6px,100% 100%,100% 100%;box-shadow:0 10px 30px -18px rgba(76,45,140,.55);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.ays-survey-bts-content{position:relative;z-index:2;display:flex;min-height:110px;align-items:center;justify-content:space-between;gap:28px}.ays-survey-bts-offer,.ays-survey-bts-actions{display:flex;align-items:center}.ays-survey-bts-offer{min-width:0;gap:9px}.ays-survey-bts-handwritten{width:280px;max-width:23vw;height:auto;color:#0755df;overflow:visible;flex:0 1 auto}.ays-survey-bts-dot{width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:#ffc51b;align-self:flex-start;margin-top:27px}.ays-survey-bts-discount{color:#8127df;font-size:38px;font-weight:800;line-height:1;letter-spacing:-1.2px;white-space:nowrap}.ays-survey-bts-actions{flex:0 0 auto;gap:12px}.ays-survey-bts-use-code{color:#5f5b69;font-size:11px;font-weight:600;line-height:1;text-transform:uppercase;letter-spacing:.14em;white-space:nowrap}.ays-survey-bts-coupon{box-sizing:border-box;display:flex;min-height:50px;align-items:center;gap:12px;padding:8px 14px;border:2px dashed rgba(129,39,223,.5);border-radius:10px;background:#fff;color:#1147c8;cursor:pointer;box-shadow:none}.ays-survey-bts-coupon:hover,.ays-survey-bts-coupon:focus{border-color:#8127df;background:rgba(129,39,223,.05);color:#1147c8}.ays-survey-bts-coupon span{font-size:19px;font-weight:700;letter-spacing:.04em}.ays-survey-bts-coupon svg{width:16px;height:16px;color:#8127df}.ays-survey-bts-cta{display:inline-flex;min-height:48px;align-items:center;justify-content:center;padding:0 27px;border-radius:9px;background:linear-gradient(90deg,#1249e7,#8127df);color:#fff!important;font-size:16px;font-weight:700;text-decoration:none!important;white-space:nowrap;box-shadow:0 8px 18px -8px rgba(91,37,194,.9);transition:transform .15s,box-shadow .15s}.ays-survey-bts-cta:hover,.ays-survey-bts-cta:focus{color:#fff;transform:translateY(-1px);box-shadow:0 10px 20px -8px rgba(91,37,194,.95)}.ays-survey-bts-decoration{position:absolute;z-index:1;pointer-events:none}.ays-survey-bts-plane{top:8px;left:12px;width:24px;color:rgba(129,39,223,.55)}.ays-survey-bts-ruler{bottom:7px;left:24px;width:36px;color:rgba(20,73,230,.35)}.ays-survey-bts-star{top:8px;right:14px;width:19px;color:#ffc51b}.ays-survey-bts-pencil{right:31px;bottom:7px;width:21px;color:rgba(129,39,223,.5);transform:rotate(-12deg)}.ays-survey-bts-wave{bottom:3px;left:50%;width:96px;color:rgba(20,73,230,.22);transform:translateX(-50%)}#ays-survey-back-to-school-banner-2026 .notice-dismiss{top:1px;right:1px;color:#756b82}#ays-survey-back-to-school-banner-2026 .notice-dismiss:before{font-size:18px}.ays-survey-bts-dismiss{position:absolute;right:39px;bottom:0;z-index:3}.ays-survey-bts-dismiss form{margin:0}.ays-survey-bts-dismiss #ays-survey-dismiss-buttons-content .ays-button{height:22px!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;color:#777!important;font-size:10px!important;line-height:22px!important;text-decoration:underline;box-shadow:none!important}.ays-survey-bts-copy-notification{position:fixed;top:50%;left:50%;z-index:10000;transform:translate(-50%,-50%);padding:12px 24px;border-radius:8px;background:rgba(0,0,0,.82);color:#fff;font-size:14px;opacity:0;transition:opacity .25s}.ays-survey-bts-copy-notification.ays-survey-bts-show{opacity:1}@media screen and (max-width:1200px){.ays-survey-bts-content{gap:18px}.ays-survey-bts-handwritten{width:225px}.ays-survey-bts-discount{font-size:31px}.ays-survey-bts-actions{gap:8px}.ays-survey-bts-coupon{min-height:44px;padding:7px 10px}.ays-survey-bts-cta{min-height:44px;padding:0 18px;font-size:14px}}@media screen and (max-width:960px){#ays-survey-back-to-school-banner-2026{padding:15px 38px 20px}.ays-survey-bts-content{min-height:90px;flex-wrap:wrap;justify-content:center;gap:12px 24px}.ays-survey-bts-handwritten{max-width:none}.ays-survey-bts-actions{justify-content:center}.ays-survey-bts-dismiss{right:38px}}@media screen and (max-width:600px){#ays-survey-back-to-school-banner-2026{width:calc(100% - 20px);margin-right:10px;padding:18px 30px 23px 18px}.ays-survey-bts-content{flex-direction:column}.ays-survey-bts-offer{flex-wrap:wrap;justify-content:center}.ays-survey-bts-handwritten{width:210px}.ays-survey-bts-discount{font-size:28px}.ays-survey-bts-actions{flex-wrap:wrap}.ays-survey-bts-use-code{width:100%;text-align:center}.ays-survey-bts-coupon{min-height:40px}.ays-survey-bts-coupon span{font-size:16px}.ays-survey-bts-cta{min-height:40px}.ays-survey-bts-plane,.ays-survey-bts-ruler,.ays-survey-bts-pencil,.ays-survey-bts-wave{display:none}.ays-survey-bts-dismiss{right:30px}}';
3791 + $content[] = '</style>';
3792 + $content[] = '<script>
3793 + (function() {
3794 + "use strict";
3795 + function initBackToSchoolBanner() {
3796 + var banner = document.getElementById("ays-survey-back-to-school-banner-2026");
3797 + if (!banner) {
3798 + return;
3799 + }
3800 + var couponButton = banner.querySelector(".ays-survey-bts-coupon");
3801 + if (!couponButton) {
3802 + return;
3803 + }
3804 + couponButton.addEventListener("click", function() {
3805 + var couponCode = couponButton.getAttribute("data-coupon");
3806 + var textarea = document.createElement("textarea");
3807 + textarea.value = couponCode;
3808 + textarea.style.position = "fixed";
3809 + textarea.style.opacity = "0";
3810 + document.body.appendChild(textarea);
3811 + textarea.focus();
3812 + textarea.select();
3813 + try {
3814 + document.execCommand("copy");
3815 + showCopyNotification();
3816 + } catch (error) {
3817 + // Keep the banner usable when clipboard access is unavailable.
3818 + }
3819 + document.body.removeChild(textarea);
3820 + });
3821 + }
3822 + function showCopyNotification() {
3823 + var notification = document.createElement("div");
3824 + notification.className = "ays-survey-bts-copy-notification";
3825 + notification.textContent = "'. esc_js(__('Coupon code copied', 'survey-maker')) .'";
3826 + document.body.appendChild(notification);
3827 + setTimeout(function() {
3828 + notification.classList.add("ays-survey-bts-show");
3829 + }, 10);
3830 + setTimeout(function() {
3831 + notification.classList.remove("ays-survey-bts-show");
3832 + setTimeout(function() {
3833 + if (notification.parentNode) {
3834 + notification.parentNode.removeChild(notification);
3835 + }
3836 + }, 250);
3837 + }, 2000);
3838 + }
3839 + if (document.readyState === "loading") {
3840 + document.addEventListener("DOMContentLoaded", initBackToSchoolBanner);
3841 + } else {
3842 + initBackToSchoolBanner();
3843 + }
3844 + })();
3845 + </script>';
3846 + echo implode('', $content); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Static banner markup; dynamic values are escaped above.
3847 + }
3848 + }
3849 +
3757 3850
3758 3851 // Survey Footer Blue Banner Sale 20%
3759 3852 public function ays_survey_footer_sale_banner_2026($ishmar){
3760 3853 if($ishmar == 0 ){