AbstractBlock
AbstractBlock class.
Description Description
Source Source
File: packages/woocommerce-blocks/src/BlockTypes/AbstractBlock.php
Methods Methods
- __construct — Constructor.
- enqueue_assets — Enqueue frontend assets for this block, just in time for rendering.
- enqueue_data — Data passed through from server to client for block.
- enqueue_editor_assets — Enqueue assets used for rendering the block in editor context.
- enqueue_scripts — Register/enqueue scripts used for this block on the frontend, during render.
- get_block_type — Get the block type.
- get_block_type_attributes — Get block attributes.
- get_block_type_editor_script — Get the editor script data for this block type.
- get_block_type_editor_style — Get the editor style handle for this block type.
- get_block_type_render_callback — Get the render callback for this block type.
- get_block_type_script — Get the frontend script handle for this block type.
- get_block_type_style — Get the frontend style handle for this block type.
- get_block_type_supports — Get the supports array for this block type.
- get_html_data_attributes — Converts block attributes to HTML data attributes.
- get_skeleton_inline_script — Script to append the correct sizing class to a block skeleton.
- initialize — Initialize this block type.
- inject_html_data_attributes — Injects block attributes into the block.
- parse_render_callback_attributes — Parses block attributes from the render_callback.
- register_block_type — Registers the block type with WordPress.
- register_block_type_assets — Register script and style assets for the block type before it is registered.
- render — Render the block. Extended by children.
- render_callback — The default render_callback for all blocks. This will ensure assets are enqueued just in time, then render the block (if applicable).