@@ -16,9 +16,9 @@ function __construct() {
1616 add_action ( 'admin_enqueue_scripts ' , array ( $ this , 'enqueue_dashboard_script ' ) );
1717
1818 add_action ( 'admin_init ' , array ( $ this , 'redirect_to_welcome_page ' ) );
19- add_action ('admin_init ' , array ( $ this , 'redirect_to_docs ' ) );
19+ add_action ('admin_init ' , array ( $ this , 'redirect_submenus ' ) );
2020
21- add_action ('admin_head ' , array ( $ this , 'redirect_to_docs_newtab ' ) );
21+ add_action ('admin_head ' , array ( $ this , 'redirect_submenus_newtab ' ) );
2222
2323 $ plugin = plugin_basename ( STACKABLE_FILE );
2424 add_filter ( 'plugin_action_links_ ' . $ plugin , array ( $ this , 'add_settings_link ' ) );
@@ -77,7 +77,7 @@ public function add_dashboard_page() {
7777 __ ( 'Go Premium ' , STACKABLE_I18N ), // Menu title.
7878 'manage_options ' , // Capability.
7979 'stackable-go-premium ' , // Menu slug.
80- array ( $ this , ' stackable_go_premium_content ' ) ,
80+ ' __return_null ' ,
8181 );
8282 }
8383 }
@@ -195,13 +195,6 @@ public static function print_tabs() {
195195 <span><?php _e ( 'Contact Us ' , STACKABLE_I18N ) ?> </span>
196196 </a>
197197 <?php } ?>
198-
199- <?php if ( STACKABLE_BUILD === 'free ' || ! sugb_fs ()->can_use_premium_code () ) { ?>
200- <a class="s-tab <?php echo $ screen ->base === 'stackable_page_stackable-go-premium ' ? 's-active ' : '' ?> "
201- href="<?php echo admin_url ( 'admin.php?page=stackable-go-premium ' )?> ">
202- <span><?php _e ( 'Go Premium ' , STACKABLE_I18N ) ?> </span>
203- </a>
204- <?php } ?>
205198 </div>
206199 <?php
207200 }
@@ -251,65 +244,6 @@ public function stackable_settings_content() {
251244 <?php
252245 }
253246
254- public function stackable_go_premium_content () {
255- ?>
256- <div class="wrap wrap-settings">
257- <div class="s-header-wrap s-header-settings">
258- <?php $ this ->print_header () ?>
259- <?php echo $ this ->print_premium_button () ?>
260- <?php echo $ this ->print_tabs () ?>
261- </div>
262- <h1 aria-hidden="true" class="s-admin-notice-marker"></h1>
263- <section id="settings-notice">
264- <div class="s-rest-settings-notice"></div>
265- <div class="s-save-settings-notice"></div>
266- </section>
267- <?php stackable_welcome_notification () ?>
268- <section class="s-body-container s-body-container-with-sidenav">
269- <div class="s-side">
270- <?php if ( STACKABLE_BUILD === 'free ' || ! sugb_fs ()->can_use_premium_code () ) : ?>
271- <aside class="s-box s-premium-box">
272- <h3><?php _e ( '🚀 Stackable Premium ' , STACKABLE_I18N ) ?> </h3>
273- <p><?php _e ( 'If you are ready for even more, upgrade to Premium and get: ' , STACKABLE_I18N ) ?> </p>
274- <ul class="s-check-list">
275- <li><?php _e ( '54+ Additional Block Layouts ' , STACKABLE_I18N ) ?> </li>
276- <li><?php _e ( '230+ Additional Library Designs ' , STACKABLE_I18N ) ?> </li>
277- <li><?php _e ( 'Dynamic Content ' , STACKABLE_I18N ) ?> </li>
278- <li><?php _e ( 'Motion Effects ' , STACKABLE_I18N ) ?> </li>
279- <li><?php _e ( 'Conditionally Display Blocks ' , STACKABLE_I18N ) ?> </li>
280- <li><?php _e ( 'User Role Manager ' , STACKABLE_I18N ) ?> </li>
281- <li><?php _e ( 'Font Awesome Pro Integration ' , STACKABLE_I18N ) ?> </li>
282- <li><?php _e ( 'Custom Block CSS ' , STACKABLE_I18N ) ?> </li>
283- <li><?php _e ( '1 Year of Updates ' , STACKABLE_I18N ) ?> </li>
284- <li><?php _e ( '1 Year of Support ' , STACKABLE_I18N ) ?> </li>
285- <li><?php _e ( 'No Ads ' , STACKABLE_I18N ) ?> </li>
286- </ul>
287- </p>
288- <p>
289- <a href="https://wpstackable.com/premium/?utm_source=wp-settings-sidebar&utm_campaign=gopremium&utm_medium=wp-dashboard" class="s-button" title="<?php esc_attr_e ( 'Get Stackable Premium ' , STACKABLE_I18N ) ?> " target="_new"><?php esc_attr_e ( 'Get Stackable Premium ' , STACKABLE_I18N ) ?> </a>
290- </p>
291- <p>
292- <a href="https://wpstackable.com/premium/?utm_source=wp-settings-sidebar&utm_campaign=learnmore&utm_medium=wp-dashboard" title="<?php esc_attr_e ( 'Learn More ' , STACKABLE_I18N ) ?> " target="_blank" rel="noopener noreferrer"><?php esc_attr_e ( 'Learn More ' , STACKABLE_I18N ) ?> →</a>
293- </p>
294- </aside>
295- <?php endif ; ?>
296- <aside class="s-box s-left-align">
297- <h3><?php _e ( '🎉 Join the Community ' , STACKABLE_I18N ) ?> </h3>
298- <p><?php _e ( 'Join the very active Stackable Community in Facebook, join thousands of like-minded people who are also building their websites and crafting beautiful and impactful web pages. ' , STACKABLE_I18N ) ?> </p>
299- <p><a href="https://www.facebook.com/groups/wpstackable" class="s-button" target="_new" title="<?php esc_attr_e ( 'Join Facebook Community ' , STACKABLE_I18N ) ?> "><?php _e ( 'Join Facebook Community ' , STACKABLE_I18N ) ?> </a></p>
300- </aside>
301- <aside class="s-box s-news-box s-left-align">
302- <h3><?php _e ( '🗞 Stackable Blog ' , STACKABLE_I18N ) ?> </h3>
303- <div class="s-news-box-content"><?php stackable_news_feed_links_cached () ?> </div>
304- <p><?php _e ( 'Keep up to date by subscribing to our newsletter. ' , STACKABLE_I18N ) ?> </p>
305- <p><a href="http://eepurl.com/dJY9xI" class="s-button" target="_new" title="<?php esc_attr_e ( 'Subscribe ' , STACKABLE_I18N ) ?> "><?php _e ( 'Subscribe ' , STACKABLE_I18N ) ?> </a></p>
306- </aside>
307- </div>
308- </section>
309- </div>
310- <?php
311- }
312-
313247 /**
314248 * Gets the video URL. If we are in development mode, display the source video,
315249 * if in an actual site, use the one in the CDN.
@@ -340,9 +274,9 @@ public function stackable_getting_started_content() {
340274 }
341275
342276 /**
343- * Redirect to the Stackable Documentation page.
277+ * Redirect to the Stackable Documentation/Premium page.
344278 */
345- public function redirect_to_docs () {
279+ public function redirect_submenus () {
346280 if ( empty ( $ _GET ['page ' ] ) ) {
347281 return ;
348282 }
@@ -351,14 +285,21 @@ public function redirect_to_docs() {
351285 wp_redirect ('https://docs.wpstackable.com ' );
352286 exit ;
353287 }
288+
289+ if ( 'stackable-go-premium ' === $ _GET ['page ' ] ) {
290+ wp_redirect ('https://wpstackable.com/premium/?utm_source=wp-settings-tabs&utm_campaign=gopremium&utm_medium=wp-dashboard ' );
291+ exit ;
292+ }
354293 }
355294
356- public function redirect_to_docs_newtab () {
295+ public function redirect_submenus_newtab () {
357296 ?>
358297 <script id='stk-documentation-set-target'>
359298 document.addEventListener('DOMContentLoaded', function() {
360- const link = document.querySelector('a[href="admin.php?page=stackable-documentation"]');
361- if (link) link.setAttribute('target', '_blank');
299+ const docs = document.querySelector('a[href="admin.php?page=stackable-documentation"]');
300+ if (docs) docs.setAttribute('target', '_blank');
301+ const premium = document.querySelector('a[href="admin.php?page=stackable-go-premium"]');
302+ if (premium) premium.setAttribute('target', '_blank');
362303 });
363304
364305 // Remove this script from the DOM after execution to clean up
0 commit comments