HEX
Server: LiteSpeed
System: Linux premium235.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: beaupptk (733)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //home/beaupptk/younisj.shop/wp-content/plugins/essential-blocks/includes/API/Server.php
<?php

namespace EssentialBlocks\API;

use EssentialBlocks\Traits\HasSingletone;

class Server {
	use HasSingletone;

	public function __construct() {
		add_action( 'rest_api_init', array( $this, 'register_routes' ) );
	}

	public function register_routes() {
		$routes = $this->routes();

		foreach ( $routes as $route ) {
			$route->register();
		}
	}

	public function routes() {
		return array(
			'product'     => Product::get_instance(),
			'post-blocks' => PostBlock::get_instance(),
			'common'      => Common::get_instance(),
		);
	}
}