HEX
Server: Apache
System: Linux ecngx285.inmotionhosting.com 4.18.0-553.79.1.lve.el8.x86_64 #1 SMP Wed Oct 15 17:59:35 UTC 2025 x86_64
User: zeusxp5 (3862)
PHP: 8.3.28
Disabled: NONE
Upload Files
File: /home/zeusxp5/chuair.org/wp-content/plugins/post-and-page-builder/includes/View/Gutenberg.php
<?php
/**
 * File: Gutenberg.php
 *
 * Gutenberg Editor Page View.
 *
 * @since      1.9.0
 * @package    Boldgrid
 * @subpackage Boldgrid\PPB\View\Gutenberg
 * @author     BoldGrid <support@boldgrid.com>
 * @link       https://boldgrid.com
 */
namespace Boldgrid\PPB\View;

/**
 * Class: Gutenberg
 *
 * Gutenberg Editor Page View.
 *
 * @since      1.9.0
 */
class Gutenberg {

	/**
	 * Setup Process.
	 *
	 * @since 1.9.0
	 */
	public function init() {
		$this->add_scripts();
	}

	/**
	 * Add scripts.
	 *
	 * @since 1.9.0
	 */
	public function add_scripts() {
		add_action( 'enqueue_block_editor_assets', function () {
			wp_enqueue_script(
				'bgppb-modern-editor',
				\Boldgrid_Editor_Assets::get_webpack_script( 'gutenberg' ),
				[ 'wp-blocks', 'wp-element', 'wp-components', 'wp-i18n' ],
				BOLDGRID_EDITOR_VERSION,
				true
			);

			wp_localize_script(
				'bgppb-modern-editor',
				'BoldgridEditor = BoldgridEditor || {}; BoldgridEditor',
				\Boldgrid_Editor_Service::get( 'assets' )->get_shared_vars()
			);

			\Boldgrid_Editor_Assets::enqueue_webpack_style( 'gutenberg' );
		} );
	}
}