Uname: Linux p3plzcpnl499967.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Software: Apache
PHP version: 8.2.30 [ PHP INFO ] PHP os: Linux
Server Ip: 208.109.40.231
Your Ip: 216.73.216.26
User: nayff91c5tsx (10005085) | Group: nayff91c5tsx (10005085)
Safe Mode: OFF
Disable Function:
NONE

name : features-slider.php
<?php
namespace Crocoblock_Wizard\Tools;

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

/**
 * Define Main exporter class
 */
class Features_Slider {

	private $source = 'https://raw.githubusercontent.com/CrocoBlock/wizard-slides/master/slides.json';

	public function __construct() {

		add_action( 'crocoblock-wizard/dashboard/before-enqueue-assets', array( $this, 'assets' ) );

		add_filter( 'crocoblock-wizard/dashboard/js-page-config', array( $this, 'page_config' ), 10, 2 );
		add_filter( 'crocoblock-wizard/dashboard/js-page-templates', array( $this, 'page_templates' ), 10, 2 );

	}

	/**
	 * Enqueue assets
	 *
	 * @return [type] [description]
	 */
	public function assets() {

		wp_register_script(
			'siema',
			CB_WIZARD_URL . 'assets/js/vendor/siema.min.js',
			array(),
			CB_WIZARD_VERSION,
			true
		);

		wp_enqueue_script(
			'crocoblock-wizard-slides',
			CB_WIZARD_URL . 'assets/js/slides.js',
			array( 'cx-vue-ui', 'siema' ),
			CB_WIZARD_VERSION,
			true
		);

	}

	public function page_config( $config ) {
		$config['slides_url'] = $this->source;
		return $config;
	}

	public function page_templates( $templates ) {
		$templates['slides'] = 'common/slides';
		return $templates;
	}

}
© 2026 GrazzMean