HEX
Server: Apache
System: Linux srv674466.hstgr.cloud 5.14.0-503.19.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jan 7 17:08:27 EST 2025 x86_64
User: rialindia (1055)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/rialindia/public_html/wp-content/plugins/popup-maker/classes/Controllers/WP/Blocks.php
<?php
/**
 * Blocks registration.
 *
 * @author    Code Atlantic
 * @package   PopupMaker
 * @copyright (c) 2024, Code Atlantic LLC.
 */

namespace PopupMaker\Controllers\WP;

use PopupMaker\Plugin\Controller;

defined( 'ABSPATH' ) || exit;

/**
 * Class Blocks
 *
 * @since 1.21.0
 */
class Blocks extends Controller {

	/**
	 * Initializes this module.
	 */
	public function init() {
		add_action( 'init', [ $this, 'register_blocks' ] );
	}

	/**
	 * Register Popup Maker blocks.
	 *
	 * @return void
	 */
	public function register_blocks() {
		$blocks = [
			'dist/blocks/cta-buttons.block.json' => [],
			'dist/blocks/cta-button.block.json' => [],
		];

		foreach( $blocks as $block => $args ) {
			register_block_type_from_metadata(
				$this->container->get_path( $block ),
				$args
			);
		}
	}
}