Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/blocksy-companion-pro   php

Repository URL to install this package:

Version: 1.8.76 

/ js / options.js

import { createElement, Fragment, Component } from '@wordpress/element'
import { Fill } from '@wordpress/components'
import DisplayCondition from './options/DisplayCondition'
import CustomizerOptionsManager from './options/CustomizerOptionsManager'

import { onDocumentLoaded } from 'blocksy-options'

import ctEvents from 'ct-events'

import PanelsManager from './header/PanelsManager'

ctEvents.on('blocksy:options:before-option', (args) => {
	if (!args.option) {
		return
	}

	if (args.option.type === 'ct-header-builder') {
		let prevHeaderBuilder = args.content

		args.content = (
			<Fragment>
				{prevHeaderBuilder}

				<Fill name="PlacementsBuilderPanelsManager">
					<PanelsManager />
				</Fill>
			</Fragment>
		)
	}
})

ctEvents.on('blocksy:options:register', (opts) => {
	opts['blocksy-display-condition'] = DisplayCondition
	opts['blocksy-customizer-options-manager'] = CustomizerOptionsManager
})