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
/** | |
* WordPress Dependencies | |
*/ | |
import { | |
useBlockProps, | |
useBlockEditingMode, | |
RichText, | |
store as blockEditorStore, | |
} from '@wordpress/block-editor'; | |
import { useSelect } from '@wordpress/data'; |
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
ln -s ~/repositories/10up-Internal/simple-page-ordering/ /Applications/MAMP/htdocs/wp-content/plugins/ |
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
/** | |
* WordPress dependencies | |
*/ | |
import { __ } from '@wordpress/i18n'; | |
import { useBlockProps, InspectorControls } from '@wordpress/block-editor'; | |
import { PanelBody, ComboboxControl } from '@wordpress/components'; | |
import { useEntityRecords } from '@wordpress/core-data'; | |
export default function Edit( { | |
attributes: { blockTaxonomyTerm }, |
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": "http://schemas.wp.org/trunk/theme.json", | |
"version": 2, | |
"settings": { | |
"layout": { | |
"contentSize": "750px" | |
}, | |
"color": { | |
"background": false, | |
"custom": false, |
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/block.json", | |
"apiVersion": 2, | |
"name": "create-block/mol-custom-blocks", | |
"version": "0.1.0", | |
"title": "Monte Logic's Custom Blocks", | |
"category": "text", | |
"icon": "flag", | |
"description": "A Gutenberg block to show your pride! This block enables you to type text and style it with the color font Gilbert from Type with Pride.", | |
"attributes": { |
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 [ |
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
<!-- 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
<?php | |
/** | |
* Examples on restricting when blocks can be locked using the UI. | |
* Based on the example provided by @mamaduka in https://github.com/WordPress/gutenberg/pull/39566 | |
* | |
* @see https://developer.wordpress.org/reference/hooks/block_editor_settings_all/ | |
*/ | |
add_filter( | |
'block_editor_settings_all', | |
function( $settings, $context ) { |
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 | |
/** | |
* Title: Example Block Pattern ( required field ) | |
* Slug: block-pattern-example (required field) | |
* Description: This is an example of how to use the new /patterns directory to register a block pattern. | |
* Categories: featured, text | |
* Viewport Width: 800 | |
* Keywords: example, block-theme, block-pattern | |
* Block Types: core/template-part/footer, core/post-content | |
* Inserter: yes |
NewerOlder