wp.blocks.getBlockTypes()
//A list of all blocks: https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/inner-blocks // Útil para filtros de Gutenberg como "allowed_block_types"
- archives
- audio
- button
- categories
# CSS/JS auto-versioning | |
RewriteEngine On | |
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L] |
wp.blocks.getBlockTypes()
//A list of all blocks: https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/inner-blocks // Útil para filtros de Gutenberg como "allowed_block_types"
// get current post categories | |
wp.data.select('core/editor').getEditedPostAttribute('categories') | |
wp.data.select('core/editor').getCurrentPostAttribute('categories') | |
// Get the data of a block | |
wp.data.select( 'core/editor' ).getBlocks()[0] | |
// Update attributes of another block | |
// wp.data.dispatch( 'core/editor' ).updateBlockAttributes( clientID, attributes ) | |
wp.data.dispatch( 'core/editor' ).updateBlockAttributes( '10d88a6d-95d6-4e07-8293-5f59c83a26c0', { heading: 'New Heading' } ) |