A Pen by Mike Kormendy on CodePen.
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 | |
$array_base = get_option('wpseo-premium-redirects-base'); | |
foreach ( $array_base as $key => $row ) { | |
file_put_contents( ABSPATH . 'yoast-redirects-base.csv', $key . ',' . $row[ 'url' ] . "\n", FILE_APPEND ); | |
} | |
$array_plain = get_option('wpseo-premium-redirects-export-plain'); | |
foreach ( $array_plain as $key => $row ) { | |
file_put_contents( ABSPATH . 'yoast-redirects-export-plain.csv', $key . ',' . $row[ 'url' ] . "\n", FILE_APPEND ); |
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 | |
namespace HWID\SampleCode; | |
class GravityForms { | |
public static function init() { | |
add_filter( 'gform_custom_merge_tags', [ 'HWID\SampleCode\GravityForms', 'custom_merge_tags' ], 10, 4 ); | |
add_filter( 'gform_replace_merge_tags', [ 'HWID\SampleCode\GravityForms', 'replace_merge_tags' ], 10, 3 ); | |
} | |
/** |
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
#!/bin/sh | |
brew tap homebrew/cask-drivers | |
brew install --cask homebrew/cask-versions/adoptopenjdk8 | |
brew install --cask ubiquiti-unifi-controller |
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
/** | |
* Gravity Wiz // Gravity Forms // Change Field ID via Browser Console | |
* | |
* Provides a simple function for changing the ID of a Gravity Forms field via the browser console from the Form Editor page. | |
* | |
* @version 1.0 | |
* @author David Smith <[email protected]> | |
* @license GPL-2.0+ | |
* @link http://gravitywiz.com/changing-your-gravity-forms-field-ids/ | |
* @video http://www.screencast.com/t/STm1eLZEsR9q |
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
#!/bin/bash | |
find /uploads/sites/*/20* -type f -iname "*.png" -exec pngquant --speed 1 --skip-if-larger --strip {} \; | |
find /uploads/sites/*/20* -type f -iname "*.png" -exec advpng -z4 {} \; | |
find /uploads/sites/*/20* -type f -iregex .*\.jpe?g$ -exec jpegoptim -f -s -v -m 50 {} \; | |
touch optimg.flag | |
# find's -newer command option compares the timestamps of files found against a defined file, in our case optimg.flag | |
# when we finish optimizing all of the images we touch the optimg.flag file to update its timestamp |
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 | |
// Manually create entries and send notifications with Gravity Forms | |
$form_id = 10; | |
// add entry | |
$entry = array( | |
"form_id" => $form_id, | |
"1" => "Entry for field ID 1", |
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 | |
/* | |
################### READ ME ################################# | |
You'll pass the URL to your feed/file to this function inside the "Download from URL" option when creating an import. | |
Image examples: https://d.pr/hCfNek and https://d.pr/MnerNb. | |
1. [custom_file_download("ftp://username:[email protected]/full/path/to/file.csv", "csv")] | |
2. [custom_file_download("http://example.com/full/path/to/file.csv", "csv")] |
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
//basic zopim widget code, from their site | |
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s= | |
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set. | |
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8'); | |
$.src='//v2.zopim.com/?26Smu9lv0NXQEOOg8IAZrMPh9yQstAcV';z.t=+new Date;$. | |
type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script'); | |
//make sure zopim does not show till we know we have department agents | |
var intial_zopim_hiding_done = false; |
NewerOlder