Skip to content

Commit 90f1351

Browse files
committed
Merge branch 'develop' into feat/design-library-full-pages
2 parents bba9253 + fee8401 commit 90f1351

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

src/plugins/global-settings/block-styles/index.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ import { __ } from '@wordpress/i18n'
2525

2626
export { GlobalBlockStyles } from './editor-loader'
2727

28-
addFilter( 'stackable.global-settings.inspector', 'stackable/global-block-styles', output => {
29-
const [ isOpen, setIsOpen ] = useState( false )
30-
const hasBlockStyles = useSelect( select => {
31-
const blockStyles = select( 'stackable/global-block-styles' ).getAllBlockStyles()
28+
if ( showProNotice || isPro ) {
29+
addFilter( 'stackable.global-settings.inspector', 'stackable/global-block-styles', output => {
30+
const [ isOpen, setIsOpen ] = useState( false )
31+
const hasBlockStyles = useSelect( select => {
32+
const blockStyles = select( 'stackable/global-block-styles' ).getAllBlockStyles()
3233

33-
return Object.keys( blockStyles ).length > 0
34-
}, [] )
34+
return Object.keys( blockStyles ).length > 0
35+
}, [] )
3536

36-
if ( showProNotice || isPro ) {
3737
return (
3838
<Fragment>
3939
{ output }
@@ -50,8 +50,5 @@ addFilter( 'stackable.global-settings.inspector', 'stackable/global-block-styles
5050
</PanelAdvancedSettings>
5151
</Fragment>
5252
)
53-
}
54-
55-
return <Fragment />
56-
}, 8 )
57-
53+
}, 8 )
54+
}

src/welcome/index.php

Lines changed: 15 additions & 7 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>
@@ -311,7 +319,7 @@ public function add_settings_link( $links ) {
311319
* Redirecting right away will not work.
312320
*/
313321
public static function start_redirect_to_welcome_page( $network_wide ) {
314-
if ( ! $network_wide ) {
322+
if ( ! $network_wide && ! defined( 'STACKABLE_NO_WELCOME_REDIRECT' ) ) {
315323
update_option( 'stackable_redirect_to_welcome', '1' );
316324
}
317325
}

0 commit comments

Comments
 (0)