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
<!-- wp:query {"queryId":1,"query":{"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":""}} --> | |
<!-- wp:post-template --> | |
<!-- wp:post-title {"isLink":true,"lock":{"remove":true}} /--> | |
<!-- wp:post-featured-image {"isLink":true,"align":"wide","lock":{"remove":true}} /--> | |
<!-- wp:post-date /--> | |
<!-- wp:post-excerpt /--> | |
<!-- wp:separator --> | |
<hr class="wp-block-separator"/> | |
<!-- /wp:separator --> | |
<!-- /wp:post-template --> |
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
register_block_pattern( | |
'locking-examples/locked-query-loop', | |
array( | |
'title' => esc_html__( 'Query Loop with locked Post Title and Featured Image blocks', 'locking-examples' ), | |
'categories' => array( 'query' ), | |
'content' => '<!-- wp:query {"queryId":26,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false}} --> | |
<div class="wp-block-query"><!-- wp:post-template --> | |
<!-- wp:post-title {"isLink":true,"lock":{"remove":true}} /--> | |
<!-- wp:post-featured-image {"isLink":true,"align":"wide","lock":{"remove":true}} /--> |
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
{ | |
"$schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 1, | |
"settings": { | |
"spacing": { | |
"blockGap": true | |
}, | |
"border": { | |
"radius": true, | |
"color": true, |
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
{ | |
"$schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 1, | |
"settings": { | |
"color": { | |
"background": true, | |
"coreGradients": true, | |
"corePalette": true, | |
"text": true, | |
"palette": [ |
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
{ | |
"$schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 1, | |
"settings": { | |
"typography": { | |
"fontFamilies": [ | |
{ | |
"fontFamily": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", | |
"slug": "system-fonts", | |
"name": "System fonts" |
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
{ | |
"$schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 1, | |
"settings": { | |
"spacing": { | |
"blockGap": true | |
}, | |
"blocks": { | |
"core/buttons": { | |
"spacing": { |
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
{ | |
"$schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 1, | |
"settings": { | |
"border": { | |
"radius": true, | |
"color": true, | |
"style": true, | |
"width": true | |
}, |
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
const { useState } = wp.element; | |
const { ServerSideRender } = wp.components; | |
const { BlockControls, InnerBlocks } = wp.blockEditor; | |
import LivePreviewButton from '../../components/live-preview-button'; | |
const EditComponent = ( props ) => { | |
const [ preview, setPreview ] = useState( false ); | |
const { attributes, clientId, name } = props; | |
return ( |
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
const { Component } = wp.element; | |
const { ServerSideRender } = wp.components; | |
const { BlockControls, InnerBlocks } = wp.blockEditor; | |
import LivePreviewButton from '../../components/live-preview-button'; | |
class EditComponent extends Component { | |
constructor(props) { | |
super(props); |
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
<?php | |
/** | |
* Defines the block templates. | |
* | |
* @todo add references to the custom blocks | |
* | |
* @return array | |
*/ | |
function get_block_templates() { | |
return [ |