Skip to content

Commit 615f256

Browse files
fix (admin settings): hide contact us tab if it's disabled
1 parent f6f4023 commit 615f256

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/welcome/index.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,19 @@ public static function print_tabs() {
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() && STACKABLE_BUILD !== 'free' && sugb_fs()->is_network_active() ) {
102-
$account_url = str_replace( 'options-general.php', 'admin.php', $account_url );
103-
$contact_url = admin_url( 'network/admin.php?page=stackable-contact' );
104-
if ( ! is_main_site() ) {
105-
$display_account_tab = false;
101+
if ( STACKABLE_BUILD === 'free' ) {
102+
$display_account_tab = false;
103+
$display_contact_tab = false;
104+
} else {
105+
if ( is_multisite() && sugb_fs()->is_network_active() ) {
106+
$account_url = str_replace( 'options-general.php', 'admin.php', $account_url );
107+
$contact_url = admin_url( 'network/admin.php?page=stackable-contact' );
108+
if ( ! is_main_site() ) {
109+
$display_account_tab = false;
110+
$display_contact_tab = false;
111+
}
112+
}
113+
if ( sugb_fs()->is_whitelabeled() ) {
106114
$display_contact_tab = false;
107115
}
108116
}
@@ -136,7 +144,7 @@ public static function print_tabs() {
136144
<a class="s-tab" href="https://docs.wpstackable.com" target="_docs">
137145
<span><?php _e( 'Documentation', STACKABLE_I18N ) ?></span></a>
138146

139-
<?php if ( $display_contact_tab ) { ?>
147+
<?php if ( $display_contact_tab && STACKABLE_BUILD !== 'free' ) { ?>
140148
<a class="s-tab <?php echo $screen->base === 'settings_page_stackable-contact' ? 's-active' : '' ?>"
141149
href="<?php echo $contact_url ?>">
142150
<span><?php _e( 'Contact Us', STACKABLE_I18N ) ?></span>

0 commit comments

Comments
 (0)