View content-locking-pattern.php
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: Content-only Test | |
* Slug: prefix/content-only-test | |
*/ | |
?> | |
<!-- wp:group {"templateLock": "contentOnly", "align":"wide","layout":{"type":"constrained","wideSize":"2000px"}} --> | |
<div class="wp-block-group alignwide"><!-- wp:columns --> | |
<div class="wp-block-columns"><!-- wp:column --> | |
<div class="wp-block-column"><!-- wp:image {"id":231,"sizeSlug":"large","linkDestination":"none"} --> |
View three-column-staggered-steps.html
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:group {"align":"full","backgroundColor":"orange","textColor":"black"} --> | |
<div class="wp-block-group alignfull has-black-color has-orange-background-color has-text-color has-background"><div class="wp-block-group__inner-container"><!-- wp:columns {"align":"wide"} --> | |
<div class="wp-block-columns alignwide"><!-- wp:column --> | |
<div class="wp-block-column"><!-- wp:paragraph {"fontSize":"huge"} --> | |
<p class="has-huge-font-size">1</p> | |
<!-- /wp:paragraph --> | |
<!-- wp:heading {"level":3,"fontSize":"extra-large"} --> | |
<h3 class="has-extra-large-font-size">Create</h3> | |
<!-- /wp:heading --> |
View add-colors-and-gradients-to-gutenberg.php
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
/** | |
* Block Editor Settings. | |
* Add custom colors and gradients to the editor. | |
*/ | |
function tabor_add_colors_and_gradients() { | |
$colors = array( | |
'primary' => '#db1c7d', | |
'secondary' => '#a528f0', | |
'tertiary' => '#90cbff', |
View register-block-category.php
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
function tabor_register_block_categories() { | |
if ( class_exists( 'WP_Block_Patterns_Registry' ) ) { | |
register_block_pattern_category( | |
'hero', | |
array( 'label' => _x( 'Hero', 'Block pattern category', 'textdomain' ) ) | |
); | |
} | |
} |
View block-variation-enqueue.php
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
function block_variation_example_enqueue() { | |
wp_enqueue_script( | |
'block-variation-example-script', | |
plugins_url( 'index.js', __FILE__ ), | |
array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ), | |
filemtime( plugin_dir_path( __FILE__ ) . '/block-variation-example.js' ) | |
); | |
} | |
add_action( 'enqueue_block_editor_assets', 'block_variation_example_enqueue' ); |
View block-variation-example.js
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.domReady( function() { | |
wp.blocks.registerBlockVariation( 'coblocks/form', { | |
name: 'event-registration', | |
title: 'Event Registration', | |
icon: '<svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="m18 10h-14v2h14zm2-8h-1v-2h-2v2h-12v-2h-2v2h-1c-1.11 0-1.99.9-1.99 2l-.01 16c0 1.1.89 2 2 2h18c1.1 0 2-.9 2-2v-16c0-1.1-.9-2-2-2zm0 18h-18v-13h18zm-5-5h-6-5v2h11z" transform="translate(13 14)"/></svg>', | |
innerBlocks: [ | |
[ 'coblocks/field-name', { label: 'Full name', hasLastName: true } ], | |
[ 'coblocks/field-email', { required: true } ], | |
[ 'coblocks/field-radio', { label: 'How do you use WordPress?', required: true, options: [ 'I write', 'I design', 'I develop', 'I manage', 'I am new to WordPress!'] } ], | |
[ 'coblocks/field-checkbox', { label: 'I’m on a gluten-free diet', options: [ 'Yes', 'No' ], required: true } ], |
View gist:c047bd3f74828147abd595ec65c612d4
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
--body-bg-color: #e0ded5 | |
--body-color: #433f40 | |
body { | |
background-color: var(--body-bg-color, #fff); | |
color: var(--body-color, #000); | |
} |
View has_block.php
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 | |
if ( has_block( 'blockgallery/masonry' ) ) { | |
// Do something, if the Block Gallery Masonry block is added to this page. | |
} |
View function.php
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
/** | |
* Modify 'More Information' tab. | |
*/ | |
function ava_child_product_additional_information_heading() { | |
return __( 'More Stuff', 'ava' ); | |
} | |
add_filter('woocommerce_product_additional_information_heading', 'ava_child_product_additional_information_heading'); | |
View add-fonts-to-gutenberg.php
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
// Enqueue fonts in the editor. | |
add_editor_style( york_fonts_url() );} |
NewerOlder