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
/* | |
* Water Canvas by Almer Thie (http://code.almeros.com). | |
* Description: A realtime water ripple effect on an HTML5 canvas. | |
* Copyright 2010 Almer Thie. All rights reserved. | |
* | |
* Example: http://code.almeros.com/code-examples/water-effect-canvas/ | |
* Tutorial: http://code.almeros.com/water-ripple-canvas-and-javascript | |
*/ | |
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
/* | |
* Water Canvas by Almer Thie (http://code.almeros.com). | |
* Description: A realtime water ripple effect on an HTML5 canvas. | |
* Copyright 2010 Almer Thie. All rights reserved. | |
* | |
* Example: http://code.almeros.com/code-examples/water-effect-canvas/ | |
* Tutorial: http://code.almeros.com/water-ripple-canvas-and-javascript | |
*/ | |
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
// Phil Hawksworth's Netlify LMS <picture> img generator | |
let getPicture = (url, alt="Missing alt text", width, height, style) => { | |
let w = width ? width : "500"; | |
let w_attr = width ? `width="${width}"` : ""; | |
let h_attr = height ? `height="${height}"` : ""; | |
let s_attr = style ? `style="${style}"` : ""; | |
return `<picture> | |
<source | |
media="(min-width: 1200px)" |
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
property defaultAccountName : "iCloud" | |
property defaultFolderName : "Saved iCloud Tabs" | |
global html | |
global processedURLs | |
on appendLineWithURLItem(urlItem) | |
my appendHTML(" <li>") | |
my appendHTML("<a href=\"" & |url| of urlItem & "\">") | |
my appendHTML(|Title| of urlItem) |
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
{ | |
"plugins": ["stylelint-order", "stylelint-scss"], | |
"defaultSeverity": "warning", | |
"rules": { | |
"at-rule-empty-line-before": [ | |
"always", | |
{ | |
"except": ["blockless-after-same-name-blockless", "first-nested"], | |
"ignore": ["after-comment", "first-nested", "blockless-after-same-name-blockless"] | |
} |
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
// Changes Gravity Forms Ajax Spinner (next, back, submit) to a transparent image | |
// this allows you to target the css and create a pure css spinner like the one used below in the style.css file of this gist. | |
add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 ); | |
function spinner_url( $image_src, $form ) { | |
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; // relative to you theme images folder | |
} |
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
import { Fragment } from "@wordpress/element"; | |
import { InnerBlocks } from "@wordpress/editor"; | |
/** | |
* Changes the edit function of an ACF-block to allow InnerBlocks | |
* Should be called like this on `editor.BlockEdit` hook: | |
* ` addFilter("editor.BlockEdit", "namespace/block", editWithInnerBlocks("acf/block-name"));` | |
* | |
* @param {string} blockName the name of the block to wrap | |
* @param {object} innerBlockParams params to be passed to the InnerBlocks component (like allowedChildren) |
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 | |
/** | |
* Enqueue scripts and styles. | |
* | |
* @since 1.0.0 | |
*/ | |
function ja_global_enqueues() { | |
wp_enqueue_style( | |
'jquery-auto-complete', |
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-block-embed figcaption { | |
margin-top: .5em; | |
color: #6c7781; | |
text-align: center; | |
font-size: 13px | |
} | |
.editor-block-list__block[data-type="core/embed"][data-align=left] .editor-block-list__block-edit, | |
.editor-block-list__block[data-type="core/embed"][data-align=right] .editor-block-list__block-edit, | |
.wp-block-embed.alignleft, |
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
// Removing plugin controls from admin | |
function remove_plugin_controls($actions, $plugin_file, $plugin_data, $context){ | |
if (array_key_exists('edit', $actions)) { | |
unset($actions['edit']); | |
} | |
if (array_key_exists('deactivate', $actions)) { |
OlderNewer