Skip to content

Instantly share code, notes, and snippets.

View michealengland's full-sized avatar

Mike England michealengland

View GitHub Profile
@michealengland
michealengland / block-filters-plugin-enqueue.php
Last active June 15, 2021 01:32
Gutenberg registerBlockStyle
View block-filters-plugin-enqueue.php
/**
* Enqueue Block Filters.
*/
function enqueue_my_block_filters() {
wp_register_script(
'block-style-filter',
plugins_url( 'block-style-filter', __FILE__ ),
array( 'wp-blocks', 'wp-element' )
);
}
@michealengland
michealengland / blur.js
Last active October 17, 2020 11:11
Intersection Observer Image Blur
View blur.js
// The element we will observe.
const heroImage = document.querySelector('img');
// Observer options.
const options = {
root: null,
rootMargin: '0px',
threshold: 0.7,
};
@michealengland
michealengland / package-lock.json
Created August 28, 2019 19:47
Cashback Packages
View package-lock.json
{
"name": "gm_roots_theme",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@gulp-sourcemaps/identity-map": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz",
"integrity": "sha512-ciiioYMLdo16ShmfHBXJBOFm3xPC4AuwO4xeRpFeHz7WK9PYsWCmigagG2XyzZpubK4a3qNKoUBDhbzHfa50LQ==",