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 | |
/** | |
* Gravity Wiz // Gravity Forms // Email Header to Identify Notification Source | |
* | |
* You've installed Gravity Forms on a ton of sites and now you're getting a ton of notifications. The problem is there | |
* is no clear indicator which site is sending the notification. How frustrating! | |
* | |
* This simple plugin automatically adds a custom header that identifies the URL that generated the Gravity Forms notification. | |
* This is most useful when installed as an MU plugin at the start of development on each site. | |
* |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Default Form List to Active Forms | |
* http://gravitywiz.com/ | |
*/ | |
add_action( 'plugins_loaded', function() { | |
if( is_callable( array( 'GFForms', 'get_page' ) ) && GFForms::get_page() == 'form_list' ) { | |
if ( ! isset( $_GET['filter'] ) ) { | |
wp_redirect( add_query_arg( array( 'filter' => 'active' ) ) ); | |
exit; |
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
// Color names come from https://www.color-blindness.com/color-name-hue/ | |
// The color values can be any valid color format: hex, rgb, hsl, CSS color names, | |
// etc. But probably best _not_ to use CSS color names. | |
$palette: ( | |
'black': #000, | |
'cornflower-blue': #55abf2, | |
'grey': #808080, | |
'fire-engine-red': #d12118, | |
'forest-green': #20a037, | |
'limeade': #56b02c, |
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
/** | |
* Add custom CSS to WP HTML Mail WordPress E-Mails | |
*/ | |
add_filter( 'haet_mail_modify_styled_mail', function( $email_html ){ | |
$custom_css = ' | |
.container-padding{ | |
padding-left: 60px; | |
padding-right: 0; | |
} |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Automatic Save & Continue | |
* | |
* Automatically save | |
* load previously saved data (via Gravity Forms' Save & Continue functionality) when a logged-in user views a form. | |
* | |
* @version 0.4 | |
* @author David Smith <[email protected]> | |
* @license GPL-2.0+ |
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
/* ------------------------------------------------------------- | |
# Variables | |
------------------------------------------------------------- */ | |
$site_maxwidth: 72rem; // Maximum width the entire site should not exceed | |
$site_maxwidth-text: 40rem; // Maximum width the main content text should not exceed | |
$spacing_horizontal: 1rem; // General horizontal padding | |
/* ------------------------------------------------------------- | |
# General Styles |
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
// A clipping object is a JavaScript object that contains the following properties. Properties values may be null. | |
// title - String | |
// text - String | |
// url - String | |
// saveDate - Date | |
// Merge function receives an array of clipping objects and returns the merged string | |
function merge(clippings) { | |
var merged = clippings.reduce(function(string, clipping) { |
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
# My Chrome developer profile is in the `Profile 1` directory, make sure to update with yours. | |
# Best on an ultra wide monitor. | |
function rwdurl() { | |
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(0,0);window.resizeTo(320,1395);window.location='$1';</script></body></html>" | |
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(330,0);window.resizeTo(480,1395);window.location='$1';</script></body></html>" | |
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(815,0);window.resizeTo(640,1395);window.location='$1';</script></body></html>" | |
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(1460,0);window.resizeTo(800,1395);window.location='$1';</script></body></html>" | |
open -n |
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
// paste in your console | |
speechSynthesis.onvoiceschanged = function() { | |
var msg = new SpeechSynthesisUtterance(); | |
msg.voice = this.getVoices().filter(v => v.name == 'Cellos')[0]; | |
msg.text = Object.keys(window).join(' '); | |
this.speak(msg); | |
}; |
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 | |
/** | |
* Return 'medium' image for mobile devices since that is what we're | |
* loading to display as the featured image on each post. | |
*/ | |
//* Filter WP SEO's OpenGraph image output | |
add_filter('wpseo_opengraph_image_size', 'disi_opengraph_image_size'); | |
function disi_opengraph_image_size($val) { | |
if( wp_is_mobile() ) { |
NewerOlder