Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Rich Tabor richtabor

🎯
Focusing
Block or report user

Report or block richtabor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View has_block.php
<?php
if ( has_block( 'blockgallery/masonry' ) ) {
// Do something, if the Block Gallery Masonry block is added to this page.
}
@richtabor
richtabor / function.php
Last active Jan 4, 2019 — forked from deeman/function.php
WooCommerce. Single product. Remove Additional Information
View function.php
/**
* 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
// Enqueue fonts in the editor.
add_editor_style( york_fonts_url() );}
View editor-fonts.scss
body {
color: $color__text-main;
font-family: $font__body;
font-size: $font__size-md;
@media screen and (min-width: 599px) {
font-size: $font__size_base;
}
}
View block-widths.scss
.wp-block {
max-width: $content__width;
&[data-align="wide"] {
max-width: $content__width--wide;
}
&[data-align="full"] {
max-width: none;
}
View add-editor-styles.php
/**
* Sets up theme defaults and registers support for various WordPress features.
*/
function tabor_setup() {
// Add support for editor styles.
add_theme_support( 'editor-styles' );
// Enqueue editor styles.
add_editor_style( 'assets/css/style-editor.css' );
}
View add-editor-styles-support.php
/**
* Sets up theme defaults and registers support for various WordPress features.
*/
function tabor_setup() {
// Add support for editor styles.
add_theme_support( 'editor-styles' );
}
add_action( 'after_setup_theme', 'tabor_setup' );
View gist:445709ae2102eaa5f3784853d8f5a73f
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-127143502-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-127143502-1');
</script>
View test
Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
You can’t perform that action at this time.