@@ -77,12 +77,12 @@ public function enqueue_dashboard_script( $hook ) {
7777 'welcomeSrcUrl ' => untrailingslashit ( plugins_url ( '/ ' , __FILE__ ) ),
7878 'i18n ' => STACKABLE_I18N ,
7979 'cdnUrl ' => STACKABLE_DESIGN_LIBRARY_URL ,
80- 'isPro ' => sugb_fs ()-> can_use_premium_code () && STACKABLE_BUILD !== 'free ' ,
80+ 'isPro ' => STACKABLE_BUILD !== 'free ' && sugb_fs ()-> can_use_premium_code () ,
8181 'showProNotice ' => stackable_should_show_pro_notices (),
8282 'pricingURL ' => 'https://wpstackable.com/premium/?utm_source=wp-settings&utm_campaign=gopremium&utm_medium=wp-dashboard ' ,
83- 'contactURL ' => ! sugb_fs ()->is_whitelabeled () ? sugb_fs ()->contact_url ( 'technical_support ' ) : '' ,
84- 'planName ' => sugb_fs ()->get_plan_name (),
85- 'showProNoticesOption ' => STACKABLE_SHOW_PRO_NOTICES && ( ! sugb_fs ()->can_use_premium_code () || STACKABLE_BUILD === ' free ' ),
83+ 'contactURL ' => STACKABLE_BUILD === ' free ' ? '' : ( ! sugb_fs ()->is_whitelabeled () ? sugb_fs ()->contact_url ( 'technical_support ' ) : '' ) ,
84+ 'planName ' => STACKABLE_BUILD === ' free ' ? '' : sugb_fs ()->get_plan_name (),
85+ 'showProNoticesOption ' => STACKABLE_SHOW_PRO_NOTICES && ( STACKABLE_BUILD === ' free ' || ! sugb_fs ()->can_use_premium_code () ),
8686 'nonceNews ' => stackable_get_news_feed_nonce (),
8787 ) );
8888 wp_localize_script ( 'stackable-welcome ' , 'stackable ' , $ args );
@@ -94,11 +94,11 @@ public static function print_tabs() {
9494
9595 $ display_account_tab = true ;
9696 $ display_contact_tab = true ;
97- $ account_url = sugb_fs ()->get_account_url ();
97+ $ account_url = STACKABLE_BUILD === ' free ' ? '' : sugb_fs ()->get_account_url ();
9898 $ contact_url = admin_url ( 'options-general.php?page=stackable-contact ' );
9999
100100 // If network activated and in multisite, the accounts page is in a different URL.
101- if ( is_multisite () && sugb_fs ()->is_network_active () ) {
101+ if ( is_multisite () && STACKABLE_BUILD !== ' free ' && sugb_fs ()->is_network_active () ) {
102102 $ account_url = str_replace ( 'options-general.php ' , 'admin.php ' , $ account_url );
103103 $ contact_url = admin_url ( 'network/admin.php?page=stackable-contact ' );
104104 if ( ! is_main_site () ) {
@@ -119,14 +119,14 @@ public static function print_tabs() {
119119 <span><?php _e ( 'Settings ' , STACKABLE_I18N ) ?> </span>
120120 </a>
121121
122- <?php if ( $ display_account_tab && sugb_fs ()->get_user () ) { ?>
122+ <?php if ( $ display_account_tab && STACKABLE_BUILD !== ' free ' && sugb_fs ()->get_user () ) { ?>
123123 <a class="s-tab <?php echo $ screen ->base === 'settings_page_stackable-account ' ? 's-active ' : '' ?> "
124124 href="<?php echo $ account_url ?> ">
125125 <span><?php _e ( 'Account ' , STACKABLE_I18N ) ?> </span>
126126 </a>
127127 <?php } ?>
128128
129- <?php if ( sugb_fs ()->has_affiliate_program () ) { ?>
129+ <?php if ( STACKABLE_BUILD !== ' free ' && sugb_fs ()->has_affiliate_program () ) { ?>
130130 <a class="s-tab <?php echo $ screen ->base === 'settings_page_stackable-affiliation ' ? 's-active ' : '' ?> "
131131 href="<?php echo admin_url ( 'options-general.php?page=stackable-affiliation ' ) ?> ">
132132 <span><?php _e ( 'Affiliation ' , STACKABLE_I18N ) ?> </span>
@@ -165,7 +165,7 @@ public static function print_header( $title = '', $image = 'logo' ) {
165165 }
166166
167167 public static function print_premium_button () { ?>
168- <?php if ( ! sugb_fs ()->can_use_premium_code () ) : ?>
168+ <?php if ( STACKABLE_BUILD === ' free ' || ! sugb_fs ()->can_use_premium_code () ) : ?>
169169 <a href="https://wpstackable.com/premium/?utm_source=wp-settings-tabs&utm_campaign=gopremium&utm_medium=wp-dashboard" class="s-button s-premium-button" title="<?php esc_attr_e ( 'Unlock my Premium Features ' , STACKABLE_I18N ) ?> " target="_new">
170170 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" width="16" height="16" style="vertical-align: middle; fill: currentColor"><path d="M321.7 0c19.1 0 32.9 18.3 27.6 36.6L295.8 224l85.2 0c19.3 0 34.9 15.6 34.9 34.9c0 10.3-4.5 20-12.3 26.6L144.9 505.2c-5.2 4.4-11.8 6.8-18.6 6.8c-19.1 0-32.9-18.3-27.6-36.6L152.2 288l-86.4 0C47.1 288 32 272.9 32 254.3c0-9.9 4.3-19.2 11.8-25.6L303.1 6.9C308.3 2.4 314.9 0 321.7 0zM285.6 85L104.4 240l79.6 0c7.5 0 14.6 3.5 19.2 9.5s6 13.8 3.9 21L162.3 427.5 345.5 272 264 272c-7.5 0-14.6-3.5-19.2-9.5s-6-13.8-3.9-21L285.6 85z"/></svg>
171171 <?php esc_attr_e ( 'Unlock my Premium Features ' , STACKABLE_I18N ) ?>
@@ -196,7 +196,7 @@ public function stackable_settings_content() {
196196 <?php do_action ( 'stackable_settings_page_mid ' ); ?>
197197 </div>
198198 <!-- <div class="s-side">
199- <?php if ( ! sugb_fs ()->can_use_premium_code () ) : ?>
199+ <?php if ( STACKABLE_BUILD === ' free ' || ! sugb_fs ()->can_use_premium_code () ) : ?>
200200 <aside class="s-box s-premium-box">
201201 <h3><?php _e ( '🚀 Stackable Premium ' , STACKABLE_I18N ) ?> </h3>
202202 <p><?php _e ( 'If you are ready for even more, upgrade to Premium and get: ' , STACKABLE_I18N ) ?> </p>
@@ -292,7 +292,7 @@ public function add_settings_link( $links ) {
292292 }
293293
294294 // Go Premium link.
295- if ( ! sugb_fs ()-> is_whitelabeled () && ! sugb_fs ()-> can_use_premium_code () ) {
295+ if ( STACKABLE_BUILD === ' free ' ) {
296296 $ premium_link = sprintf ( '<a href="%s" target="_blank" style="color: #93003c; text-shadow: 1px 1px 1px #eee; font-weight: bold;">%s</a> ' ,
297297 'https://wpstackable.com/premium/?utm_source=wp-plugins&utm_campaign=gopremium&utm_medium=wp-dashboard ' ,
298298 __ ( 'Go Premium ' , STACKABLE_I18N )
@@ -320,9 +320,10 @@ public static function start_redirect_to_welcome_page( $network_wide ) {
320320 * Redirect to the welcome screen if our marker exists.
321321 */
322322 public function redirect_to_welcome_page () {
323+
323324 if ( get_option ( 'stackable_redirect_to_welcome ' ) &&
324325 current_user_can ( 'manage_options ' ) &&
325- ! sugb_fs ()->is_activation_mode ()
326+ ( STACKABLE_BUILD === ' free ' || ! sugb_fs ()->is_activation_mode () )
326327 ) {
327328 // Never go here again.
328329 delete_option ( 'stackable_redirect_to_welcome ' );
0 commit comments