Skip to content

Commit 116bf36

Browse files
Added STACKABLE_DISABLE_DEPRECATED_CODE constant to disable ALL deprecated code
1 parent 74cdffb commit 116bf36

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

plugin.php

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -290,20 +290,21 @@ function is_frontend() {
290290
}
291291
}
292292

293-
// Deprecated.
294-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/editor-settings.php' );
295-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/native-global-colors.php' );
296-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/navigation-panel-pre-enabled.php' );
297-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/font-awesome-version.php' );
298-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/global-color-schemes.php' );
299-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/block-defaults.php' );
293+
// Allow users to disable the deprecated code via STACKABLE_DISABLE_DEPRECATED_CODE.
294+
if ( ! defined( 'STACKABLE_DISABLE_DEPRECATED_CODE' ) ) {
295+
// Deprecated.
296+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/editor-settings.php' );
297+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/native-global-colors.php' );
298+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/navigation-panel-pre-enabled.php' );
299+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/font-awesome-version.php' );
300+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/global-color-schemes.php' );
301+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/block-defaults.php' );
300302

301-
/**
302-
* V2 Deprecated
303-
*/
304-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/init.php' );
305-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/blocks.php' );
306-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/disabled-blocks.php' );
307-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/design-library/init.php' );
308-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/optimization-settings.php' );
309-
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/global-settings.php' );
303+
// V2 Deprecated
304+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/init.php' );
305+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/blocks.php' );
306+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/disabled-blocks.php' );
307+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/design-library/init.php' );
308+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/optimization-settings.php' );
309+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/v2/global-settings.php' );
310+
}

0 commit comments

Comments
 (0)