# ablocks/2.13.1/includes/api.php

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

- Page: https://pluginprobe.com/plugins/ablocks/2.13.1/code/includes/api.php
- Raw: https://pluginprobe.com/plugins/ablocks/2.13.1/raw/includes/api.php
- Modified: 2026-09-08T12:29: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.13.1/code/includes/api.php#L10-L20`.

```php
<?php
namespace ABlocks;

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


class API {
	public static function init() {
		$self = new self();
		$self->register_routes();
	}
	public static function register_routes() {
		add_action( 'rest_api_init', function () {
			( new \ABlocks\API\FormBuilderController() )->register_routes();
			( new \ABlocks\API\SearchController() )->register_routes();
			( new \ABlocks\API\LoopBuilderController() )->register_routes();
			( new \ABlocks\API\PasteController() )->register_routes();
		});
	}
}

```
