This file contains hidden or 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 | |
# Pull an install's files and DB from WP Engine | |
# Variables | |
lpath='app/public/' | |
rpath='~/sites/'$install | |
#User input | |
read -p 'Repo to clone (blank if none): ' repo | |
read -p 'Install to pull: ' install | |
read -r -p 'Include uploads? (y/N) ' response | |
read -p 'Local MySQL port: ' port |
This file contains hidden or 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 | |
# Programatically flush a WPE cache | |
# Requires https://github.com/a7/wpe-cache-flush/ | |
# Set private key in $private_key | |
# @params install | |
# @params private_key | |
# @returns HTTP status code | |
# Variables | |
$private_key=YOUR_PRIVATE_KEY |
This file contains hidden or 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
/** | |
* Set {n} selected text to show after 1 selection, on all facets | |
*/ | |
function td_facetwp_selected() { | |
if ( is_tax() ) { | |
?> | |
<script> | |
(function($) { | |
$(function() { | |
if ('undefined' !== typeof FWP) { |
This file contains hidden or 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_filter( 'facetwp_render_output', function( $output ) { | |
$output['settings']['location']['numDisplayed'] = 1; | |
return $output; | |
}); |
This file contains hidden or 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
# List of trackers for DNS blocking | |
# Taken from https://reports.exodus-privacy.eu.org/trackers/ and https://discourse.pi-hole.net/t/trackers/5656 | |
0.0.0.0 a4.tl2 | |
0.0.0.0 accengage.com | |
0.0.0.0 aatkit.com | |
0.0.0.0 adswizz.com | |
0.0.0.0 appboy.com | |
0.0.0.0 adnxs.com | |
0.0.0.0 appsflyer.com |
This file contains hidden or 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 | |
/* | |
WORDPRESS SPECIFIC AJAX HANDLER (because admin-ajax.php does not render plugin shortcodes). | |
credits: Raz Ohad https://coderwall.com/p/of7y2q/faster-ajax-for-wordpress | |
*/ | |
//mimic the actual admin-ajax | |
define('DOING_AJAX', true); | |
if (!isset( $_REQUEST['action'])) | |
die('-1'); |
This file contains hidden or 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
// Adapted from https://gist.github.com/mgibbs189/f2469009a7039159e229efe5a01dab23 | |
function fwp_load_more() { | |
?> | |
<script> | |
(function($) { | |
$(function() { | |
if ('object' != typeof FWP) { | |
return; | |
} |
This file contains hidden or 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 | |
/** | |
*Reduce the strength requirement on the woocommerce password. | |
* | |
* Strength Settings | |
* 3 = Strong (default) | |
* 2 = Medium | |
* 1 = Weak | |
* 0 = Very Weak / Anything | |
*/ |