is_readable( $file ) ? require_once $file : null, [ DIR . 'vendor/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php', ...glob( DIR . 'vendor/wptrt/admin-notices/src/*.php' ), ...glob( DIR . 'includes/utility/*.php' ), DIR . 'includes/block-styles.php', DIR . 'includes/block-supports.php', DIR . 'includes/fonts.php', DIR . 'includes/optimization.php', DIR . 'includes/patterns.php', DIR . 'includes/scripts.php', DIR . 'includes/styles.php', ...glob( DIR . 'includes/block-filters/*.php' ), ...glob( DIR . 'includes/extensions/*.php' ), ] ); } add_action( 'after_setup_theme', NS . 'load_dependencies' ); /** * Load theme dependencies. * * @since 0.4.2 * * @return void */ function load_dependencies(): void { if ( ! function_exists( 'tgmpa' ) || ! class_exists( 'WPTRT\\AdminNotices\\Notices' ) ) { return; } global $wp_version; $min_wp_version = '6.1'; if ( str_contains( $wp_version, $min_wp_version ) || version_compare( $wp_version, $min_wp_version, '>=' ) ) { if ( ! defined( 'GUTENBERG_VERSION' ) ) { return; } $notice = new Notices(); $notice->add( 'blockify_deactivate_gutenberg', __( 'Please deactivate Gutenberg', 'blockify' ), __( 'Gutenberg is no longer required to use Blockify with WordPress 6.1 and higher. ', 'blockify' ) . '' . __( 'Go to plugins page →', 'blockify' ) . '', [] ); $notice->boot(); return; } tgmpa( [ [ 'name' => 'Gutenberg', 'slug' => 'gutenberg', 'required' => false, ], ] ); }