Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > essential-blocks > src > > blocks > tab > src
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 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
constants | Directory | - | - | |
attributes.js | File | 228 bytes | September 03 2024 16:13:22. | |
edit.js | File | 1915 bytes | February 18 2025 14:31:10. | |
icon.svg | File | 2754 bytes | August 27 2024 16:37:06. | |
index.js | File | 544 bytes | August 27 2024 16:37:06. | |
save.js | File | 544 bytes | September 03 2024 16:13:22. |
/** * WordPress dependencies */ import { __ } from "@wordpress/i18n"; import { InnerBlocks } from "@wordpress/block-editor"; import { useSelect } from "@wordpress/data"; import { memo, useEffect } from '@wordpress/element' import { BlockProps, withBlockContext } from "@essential-blocks/controls"; import defaultAttributes from "./attributes"; const Edit = (props) => { const { attributes, setAttributes, clientId, context } = props; const { tabId, tabParentId } = attributes; // you must declare this variable const enhancedProps = { ...props, blockPrefix: 'eb-tab', rootClass: `eb-guten-block-main-parent-wrapper eb-tab-editor-wrap`, }; const { blocks } = useSelect((select) => ({ blocks: select("core/block-editor").getBlockOrder(clientId) }), []); useEffect(() => { setAttributes({ tabParentId : context['eb/tabParentId'], }) }, [context['eb/tabParentId']]) return ( <BlockProps.Edit {...enhancedProps}> <div className={`eb-tab-wrapper eb-tab-wrapper-editor`} data-tab-id={tabId} data-tab-parent-id={tabParentId} > <div className="eb-tab-inner"> <InnerBlocks orientation={"vertical"} templateLock={ // templateLock ? templateLock : false } renderAppender={ blocks.length > 0 ? undefined : InnerBlocks.ButtonBlockAppender } /> </div> </div> </BlockProps.Edit> ); } export default memo(withBlockContext(defaultAttributes)(Edit))
SILENT KILLER Tool