HEX
Server: Apache
System: Linux webm010.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: alloesb (202139)
PHP: 8.3.31
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/alloesb/www/wp-content/plugins/form-maker/booster/Gutenberg.php
<?php

/**
 * Class TWBGutenberg
 */
class TWBGutenberg {
  private $booster;
  function __construct($booster) {
    $this->booster = $booster;
    add_action('enqueue_block_editor_assets', array($this, 'register_scripts'));
  }

  /**
   * Register scripts.
   *
   * @return void
   */
  public function register_scripts() {
    wp_enqueue_script(TenWebBooster::PREFIX . '-gutenberg', $this->booster->plugin_url . '/assets/js/gutenberg/gutenberg-compiled.js', array(
      'wp-plugins',
      'wp-edit-post'
    ), TenWebBooster::VERSION);
    wp_localize_script(TenWebBooster::PREFIX . '-gutenberg', 'twb', array(
      'cta_button' => $this->booster->cta_button,
      'href' => $this->booster->submenu_url,
    ));
    wp_enqueue_style(TenWebBooster::PREFIX . '-global');
    if ( $this->booster->cta_button['button_color'] || $this->booster->cta_button['text_color'] ) {
      wp_add_inline_style(TenWebBooster::PREFIX . '-global', '.twb-custom-button, .twb-custom-button:hover {background-color: ' . $this->booster->cta_button['button_color'] . ' !important; color: ' . $this->booster->cta_button['text_color'] . ' !important;}');
    }
  }
}