# ablocks/2.9.1/addons/theme-builder/compatibility-manager.php

aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder &amp; Animation Builder, version 2.9.1. 31 lines.

- Page: https://pluginprobe.com/plugins/ablocks/2.9.1/code/addons/theme-builder/compatibility-manager.php
- Raw: https://pluginprobe.com/plugins/ablocks/2.9.1/raw/addons/theme-builder/compatibility-manager.php
- Modified: 2025-04-22T12:59:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ablocks/2.9.1/code/addons/theme-builder/compatibility-manager.php#L10-L20`.

```php
<?php
namespace ABlocksThemeBuilder;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

use ABlocksThemeBuilder\Compatibility\Astra;
use ABlocksThemeBuilder\Compatibility\Fallback;

class CompatibilityManager {
	protected $theme;
	protected $compat_class;

	public static function init() {
		$self = new self();
		$self->theme = wp_get_theme()->get( 'TextDomain' ); // or use get_stylesheet()
		add_action( 'wp', [ $self, 'dispatch_hooks' ], 99 );
	}
	public function dispatch_hooks() {
		switch ( strtolower( $this->theme ) ) {
			case 'astra':
				$this->compat_class = new Astra( $this->theme );
				break;
			default:
				$this->compat_class = new Fallback( '' );
		}
		$this->compat_class->init();
	}
}

```
