11<div id="fz-features" class="feedzy-wrap">
22
3- <?php load_template (FEEDZY_ABSPATH . '/includes/layouts/header.php ' ); ?>
3+ <?php load_template ( FEEDZY_ABSPATH . '/includes/layouts/header.php ' ); ?>
44
55 <?php
66 // phpcs:ignore WordPress.Security.NonceVerification
7- $ active_tab = isset ($ _REQUEST ['tab ' ]) ? sanitize_text_field (wp_unslash ($ _REQUEST ['tab ' ]) ) : 'help ' ;
7+ $ active_tab = isset ( $ _REQUEST ['tab ' ] ) ? sanitize_text_field ( wp_unslash ( $ _REQUEST ['tab ' ] ) ) : 'help ' ;
88 ?>
99
1010 <?php
11- $ skip_subscribe = get_option ( 'feedzy_rss_feeds_skip_subscribe ' );
12- $ subscribed_notice = get_option ('feedzy_rss_feeds_dismiss_subscribe_notice ' );
13- if ( 'yes ' === $ skip_subscribe && 'no ' === $ subscribed_notice ) :
14- ?>
11+ $ skip_subscribe = get_option ( 'feedzy_rss_feeds_skip_subscribe ' );
12+ $ subscribed_notice = get_option ( 'feedzy_rss_feeds_dismiss_subscribe_notice ' );
13+ if ( 'yes ' === $ skip_subscribe && 'no ' === $ subscribed_notice ) :
14+ ?>
1515 <div class ="feedzy-container">
1616 <div class="feedzy-helper-notice" style="padding: 30px ;position: relative">
1717 <button
1818 type="button"
1919 class="feedzy-notice-dismiss"
2020 aria-label="<?php esc_attr_e ( 'Dismiss this notice ' , 'feedzy-rss-feeds ' ); ?> "
2121 >
22- ×
23- </button>
22+ ×
23+ </button>
2424
2525 <h2 class="feedzy-notice-title">
2626 <?php esc_html_e ( 'Welcome to Feedzy! ' , 'feedzy-rss-feeds ' ); ?>
@@ -31,7 +31,7 @@ class="feedzy-notice-dismiss"
3131 </p>
3232
3333 <form id="feedzy-subscribe-form" method="post" action="">
34- <?php wp_nonce_field ('feedzy_subscribe_nonce ' , 'feedzy_subscribe_nonce_field ' ); ?>
34+ <?php wp_nonce_field ( 'feedzy_subscribe_nonce ' , 'feedzy_subscribe_nonce_field ' ); ?>
3535
3636 <input
3737 type="email"
@@ -71,14 +71,14 @@ class="feedzy-subscribe"
7171 <div class="fz-tabs-menu">
7272 <ul>
7373 <li>
74- <a href="<?php echo esc_url (admin_url ('admin.php?page=feedzy-support&tab=help ' ) ); ?> "
75- class="<?php echo 'help ' === $ active_tab ? 'active ' : '' ; ?> "><?php esc_html_e ('Getting Started ' , 'feedzy-rss-feeds ' ); ?> </a>
74+ <a href="<?php echo esc_url ( admin_url ( 'admin.php?page=feedzy-support&tab=help ' ) ); ?> "
75+ class="<?php echo 'help ' === $ active_tab ? 'active ' : '' ; ?> "><?php esc_html_e ( 'Getting Started ' , 'feedzy-rss-feeds ' ); ?> </a>
7676 </li>
7777 <li>
78- <a href="<?php echo esc_url (admin_url ('admin.php?page=feedzy-support&tab=docs ' ) ); ?> "
79- class="<?php echo 'docs ' === $ active_tab ? 'active ' : '' ; ?> "><?php esc_html_e ('Documentation ' , 'feedzy-rss-feeds ' ); ?> </a>
78+ <a href="<?php echo esc_url ( admin_url ( 'admin.php?page=feedzy-support&tab=docs ' ) ); ?> "
79+ class="<?php echo 'docs ' === $ active_tab ? 'active ' : '' ; ?> "><?php esc_html_e ( 'Documentation ' , 'feedzy-rss-feeds ' ); ?> </a>
8080 </li>
81- <?php if (! feedzy_is_pro ()) : ?>
81+ <?php if ( ! feedzy_is_pro () ) : ?>
8282 <li>
8383 <a href="<?php echo esc_url ( admin_url ( 'admin.php?page=feedzy-support&tab=feedzy-pro ' ) ); ?> "
8484 class="<?php echo 'feedzy-pro ' === $ active_tab ? 'active ' : '' ; ?> "><?php esc_html_e ( 'Free vs Pro ' , 'feedzy-rss-feeds ' ); ?> </a>
@@ -91,8 +91,8 @@ class="<?php echo 'license' === $active_tab ? 'active' : ''; ?>"><?php esc_html_
9191 </li>
9292 <?php endif ; ?>
9393 <li>
94- <a href="<?php echo esc_url (admin_url ('admin.php?page=feedzy-support&tab=improve ' ) ); ?> "
95- class="<?php echo 'improve ' === $ active_tab ? 'active ' : '' ; ?> "><?php esc_html_e ('Help us improve! ' , 'feedzy-rss-feeds ' ); ?> </a>
94+ <a href="<?php echo esc_url ( admin_url ( 'admin.php?page=feedzy-support&tab=improve ' ) ); ?> "
95+ class="<?php echo 'improve ' === $ active_tab ? 'active ' : '' ; ?> "><?php esc_html_e ( 'Help us improve! ' , 'feedzy-rss-feeds ' ); ?> </a>
9696 </li>
9797 <li>
9898 <a href="<?php echo esc_url ( admin_url ( 'admin.php?page=feedzy-settings ' ) ); ?> "
@@ -111,22 +111,22 @@ class="<?php echo 'integration' === $active_tab ? 'active' : ''; ?>">
111111 <?php $ support_tab_heading = apply_filters ( 'feedzy_support_tab_heading ' , '' , $ active_tab ); ?>
112112 <?php if ( ! empty ( $ support_tab_heading ) ) : ?>
113113 <li>
114- <?php echo wp_kses_post ($ support_tab_heading ); ?>
114+ <?php echo wp_kses_post ( $ support_tab_heading ); ?>
115115 </li>
116116 <?php endif ; ?>
117117 </ul>
118118 </div>
119119
120120 <?php
121- switch ($ active_tab ) {
121+ switch ( $ active_tab ) {
122122 case 'help ' :
123- load_template (FEEDZY_ABSPATH . '/includes/layouts/feedzy-tutorial.php ' );
123+ load_template ( FEEDZY_ABSPATH . '/includes/layouts/feedzy-tutorial.php ' );
124124 break ;
125125 case 'docs ' :
126- load_template (FEEDZY_ABSPATH . '/includes/layouts/feedzy-documentation.php ' );
126+ load_template ( FEEDZY_ABSPATH . '/includes/layouts/feedzy-documentation.php ' );
127127 break ;
128128 case 'feedzy-pro ' :
129- load_template (FEEDZY_ABSPATH . '/includes/layouts/feedzy-pro.php ' );
129+ load_template ( FEEDZY_ABSPATH . '/includes/layouts/feedzy-pro.php ' );
130130 break ;
131131 case 'improve ' :
132132 load_template ( FEEDZY_ABSPATH . '/includes/layouts/feedzy-improve.php ' );
@@ -135,45 +135,45 @@ class="<?php echo 'integration' === $active_tab ? 'active' : ''; ?>">
135135 load_template ( FEEDZY_ABSPATH . '/includes/layouts/feedzy-license.php ' );
136136 break ;
137137 default :
138- $ template = apply_filters ('feedzy_support_tab_content ' , '' , $ active_tab );
139- if (! empty ($ template) ) {
140- load_template ($ template );
138+ $ template = apply_filters ( 'feedzy_support_tab_content ' , '' , $ active_tab );
139+ if ( ! empty ( $ template ) ) {
140+ load_template ( $ template );
141141 }
142142 }
143143 ?>
144144 </div>
145145 </div>
146- <?php if (in_array ($ active_tab , array ('help ' , 'docs ' ), true )) : ?>
146+ <?php if ( in_array ( $ active_tab , array ( 'help ' , 'docs ' ), true ) ) : ?>
147147 <div class="feedzy-accordion-item need-help-box">
148148 <div class="feedzy-accordion-item__content">
149- <h3 class="h3"><?php esc_html_e ('Need help with Feedzy? ' , 'feedzy-rss-feeds ' ); ?> </h3>
149+ <h3 class="h3"><?php esc_html_e ( 'Need help with Feedzy? ' , 'feedzy-rss-feeds ' ); ?> </h3>
150150 <?php
151- if (! defined ('FEEDZY_PRO_VERSION ' ) ) {
152- $ upsell_link = tsdk_translate_link (tsdk_utmify (FEEDZY_UPSELL_LINK , 'dedicatedsupport ' ) );
151+ if ( ! defined ( 'FEEDZY_PRO_VERSION ' ) ) {
152+ $ upsell_link = tsdk_translate_link ( tsdk_utmify ( FEEDZY_UPSELL_LINK , 'dedicatedsupport ' ) );
153153 ?>
154154 <p>
155155 <?php
156156 echo wp_kses_post (
157157 wp_sprintf (
158158 // Translators: %1$s is the opening anchor tag for the upsell link, %2$s is the closing anchor tag.
159- __ ('If you did not found an answer in our Knowledge Base, you can always ask for help from our community based forum or %1$s get dedicated support with our premium plans. %2$s ' , 'feedzy-rss-feeds ' ),
160- '<a target="_blank" href=" ' . esc_url ($ upsell_link ) . '"> ' ,
159+ __ ( 'If you did not found an answer in our Knowledge Base, you can always ask for help from our community based forum or %1$s get dedicated support with our premium plans. %2$s ' , 'feedzy-rss-feeds ' ),
160+ '<a target="_blank" href=" ' . esc_url ( $ upsell_link ) . '"> ' ,
161161 '</a> '
162162 )
163163 );
164164 ?>
165165 </p>
166166 <a href="https://wordpress.org/support/plugin/feedzy-rss-feeds/" class="btn btn-outline-primary"
167167 target="_blank">
168- <?php esc_html_e ('Community Forum ' , 'feedzy-rss-feeds ' ); ?>
168+ <?php esc_html_e ( 'Community Forum ' , 'feedzy-rss-feeds ' ); ?>
169169 </a>
170170 <?php
171171 } else {
172172 ?>
173- <p><?php echo wp_kses_post (wp_sprintf (__ ('If you didn \'t found an answer in our Knowledge Base, our dedicated support team standby to help you. ' , 'feedzy-rss-feeds ' )) ); ?>
173+ <p><?php echo wp_kses_post ( wp_sprintf ( __ ( 'If you didn \'t found an answer in our Knowledge Base, our dedicated support team standby to help you. ' , 'feedzy-rss-feeds ' ) ) ); ?>
174174 </p>
175175 <a href="https://store.themeisle.com/contact" class="btn btn-outline-primary"
176- target="_blank"><?php esc_html_e ('Contact Support ' , 'feedzy-rss-feeds ' ); ?> </a>
176+ target="_blank"><?php esc_html_e ( 'Contact Support ' , 'feedzy-rss-feeds ' ); ?> </a>
177177 <?php
178178 }
179179 ?>
@@ -185,8 +185,8 @@ class="<?php echo 'integration' === $active_tab ? 'active' : ''; ?>">
185185
186186<script>
187187jQuery(document).ready(function($) {
188- $('body').on('click', '.feedzy-notice-dismiss', function(e) {
189- e.preventDefault();
188+ $('body').on('click', '.feedzy-notice-dismiss', function(e) {
189+ e.preventDefault();
190190 const $notice = $(this).closest('.feedzy-helper-notice');
191191 const $button = $(this);
192192 $button.prop('disabled', true);
@@ -211,57 +211,57 @@ class="<?php echo 'integration' === $active_tab ? 'active' : ''; ?>">
211211 $(this).remove();
212212 });
213213 });
214- });
215-
216- $('body').on('click', '.feedzy-subscribe', function(e) {
217- e.preventDefault();
218-
219- const $button = $(this);
220- const withSubscribe = $(this).data('fz_subscribe');
214+ });
215+
216+ $('body').on('click', '.feedzy-subscribe', function(e) {
217+ e.preventDefault();
218+
219+ const $button = $(this);
220+ const withSubscribe = $(this).data('fz_subscribe');
221221
222- /**
223- * @type {HTMLFormElement}
224- */
225- const subscriptionForm = document.getElementById('feedzy-subscribe-form');
222+ /**
223+ * @type {HTMLFormElement}
224+ */
225+ const subscriptionForm = document.getElementById('feedzy-subscribe-form');
226226
227- if (withSubscribe && subscriptionForm.checkValidity() === false) {
228- subscriptionForm.reportValidity();
229- return false;
230- }
227+ if (withSubscribe && subscriptionForm.checkValidity() === false) {
228+ subscriptionForm.reportValidity();
229+ return false;
230+ }
231231
232- const emailElement = $('#fz_subscribe_email');
233-
234- emailElement.next('.fz-field-error').remove();
235-
236- const postData = {
237- action: 'feedzy_dashboard_subscribe',
238- _wpnonce: $('#feedzy_subscribe_nonce_field').val(),
239- integrate_with: 'shortcode'
240- };
232+ const emailElement = $('#fz_subscribe_email');
233+
234+ emailElement.next('.fz-field-error').remove();
235+
236+ const postData = {
237+ action: 'feedzy_dashboard_subscribe',
238+ _wpnonce: $('#feedzy_subscribe_nonce_field').val(),
239+ integrate_with: 'shortcode'
240+ };
241241
242- if (withSubscribe) {
243- postData.with_subscribe = 1;
244- postData.email = emailElement.val();
245- }
242+ if (withSubscribe) {
243+ postData.with_subscribe = 1;
244+ postData.email = emailElement.val();
245+ }
246246
247- $button.prop('disabled', true);
247+ $button.prop('disabled', true);
248248
249- $.post(ajaxurl, postData, function(res) {
250- if (res.success) {
251- $('.feedzy-helper-notice').fadeOut(400, function() {
252- $(this).remove();
253- });
254-
255- if (res.data && res.data.redirect_to) {
256- window.location.href = res.data.redirect_to;
257- }
258- }
259-
260- $button.prop('disabled', false);
261- }).fail(function() {
262- $button.prop('disabled', false);
263- alert('An error occurred. Please try again.');
264- });
265- });
249+ $.post(ajaxurl, postData, function(res) {
250+ if (res.success) {
251+ $('.feedzy-helper-notice').fadeOut(400, function() {
252+ $(this).remove();
253+ });
254+
255+ if (res.data && res.data.redirect_to) {
256+ window.location.href = res.data.redirect_to;
257+ }
258+ }
259+
260+ $button.prop('disabled', false);
261+ }).fail(function() {
262+ $button.prop('disabled', false);
263+ alert('An error occurred. Please try again.');
264+ });
265+ });
266266});
267267</script>
0 commit comments