<?php //* do not include php tag
/**
* Callback for WordPress register_meta() sanitize parameter.
*
* Sanitize the 'sample_count' meta value before saved to the database.
*
* @see https://codex.wordpress.org/Function_Reference/register_meta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' } ) |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CSS/JS auto-versioning | |
RewriteEngine On | |
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L] |