register_hooks(); // Init Classes and Hooks (new Admin)->register_hooks(); (new Front)->register_hooks(); (new Gutenberg)->register_hooks(); (new Settings)->register_hooks(); // Blocks (new Plugin)->run(); (new Notice)->run(); (new Ad)->run(); (new AdText)->run(); (new Product)->run(); (new Card)->run(); (new AddToCart)->run(); (new Post)->run(); (new Testimonial)->run(); (new Gmap)->run(); (new ClickToTweet)->run(); } /** * AGB needs WP 5.0+ or Gutenberg Plugin to work */ public function check_compatibility() { global $wp_version; if ( ! version_compare( $wp_version, '5.0', '>=' ) and ! is_plugin_active( 'gutenberg/gutenberg.php' ) ) { deactivate_plugins( '/advanced-gutenberg-blocks/plugin.php' ); add_action( 'admin_notices', array( $this , 'compatibility_notice') ); } } public function compatibility_notice() { ?>