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
/* | |
* HelpScout Zap: Get Number of Unassigned in a Specific Mailbox | |
* Use Zapier's "Code" Action to trigger this | |
* This only works with Zapier, it depends on the "callback" functions | |
*/ | |
var btoa = function (str) {return new Buffer(str).toString('base64');}; | |
fetch('https://api.helpscout.net/v1/mailboxes/{HELPSCOUT_MAILBOX_ID}/folders.json', { | |
cache: 'no-cache', |
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 | |
// Place in functions.php of Twenty Sixteen to see editor background take on color of customizer background. | |
/** | |
* Build editor stylesheet from customizer settings upon customizer save. | |
*/ | |
function kwh_build_stylesheet() { | |
$upload_dir = wp_upload_dir(); | |
$stylesheet = $upload_dir['basedir'] . '/kwh-editor-style.css'; | |
$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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
/** | |
* Optimize WooCommerce Scripts | |
* Updated for WooCommerce 2.0+ | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag |