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(); (new Summary)->run(); (new Intro)->run(); (new Giphy)->run(); (new Unsplash)->run(); } /** * AGB needs WP 5.0+ or Gutenberg Plugin to work */ public function check_compatibility() { global $wp_version; // Check version 5+ and RC if ( version_compare( $wp_version, '5.0', '>=' ) or strpos( $wp_version, '5.0-RC') !== false ) { return; } // WP 4.x Check if plugin is activated if ( ! 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() { ?>