Valet switch PHP version with these commands
Install PHP 5.6 and switch Valet to PHP 5.6
valet stop
brew unlink php71
brew install php56
brew install php56-mcrypt
<?php | |
// Put this in wp-config.php and replace https://example.com/ with the URL of the production site. | |
define( 'RH_USE_REMOTE_MEDIA_URL', 'https://example.com/' ); | |
// Put the rest of this in functions.php or a custom plugin or somewhere else. | |
if ( defined( 'RH_USE_REMOTE_MEDIA_URL' ) && ! empty( RH_USE_REMOTE_MEDIA_URL ) ) { | |
add_filter( 'wp_get_attachment_image_src', 'filter_wp_get_attachment_image_src' ); | |
add_filter( 'wp_calculate_image_srcset', 'filter_wp_calculate_image_srcset' ); | |
add_filter( 'wp_get_attachment_url', 'filter_wp_get_attachment_url' ); | |
} |
#!/usr/bin/env bash | |
set -e | |
if [ ! -d src/amazon-s3-and-cloudfront ]; then | |
echo 'This script must be run from the repository root.' | |
exit 1 | |
fi | |
for PROG in composer find sed unzip |
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
{ | |
"use_https": "", | |
"purge_amazonS3_info": "" | |
} |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
<?php | |
/*** | |
* ____ _____ _____ _____ _____ _ _ _ | |
* / __ \| __ \|_ _/ ____|_ _| \ | | /\ | | | |
* | | | | |__) | | || | __ | | | \| | / \ | | | |
* | | | | _ / | || | |_ | | | | . ` | / /\ \ | | | |
* | |__| | | \ \ _| || |__| |_| |_| |\ |/ ____ \| |____ | |
* \____/|_|__\_\_____\_____|_____|_| \_/_/ \_\______| | |
* /\ | __ \| __ \ /\\ \ / / | |
* / \ | |__) | |__) | / \\ \_/ / |
<?php | |
/** | |
* Plugin Name: PayPal Sandbox IPN Tester | |
* Description: Pings the IPN endpoint to see if your server can connect. Just head to <a href="/?ipn-test=1">yoursite.com/?ipn-test=1</a> whilst logged in as admin. | |
* Version: 1.0.0 | |
* Author: WooThemes | |
* Requires at least: 4.1 | |
* Tested up to: 4.3 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
<?php | |
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) { | |
if ( isset( $_SERVER['HTTP_X_FORWARDED_PORT'] ) && ! empty( $_SERVER['HTTP_X_FORWARDED_PORT'] ) ) { | |
$ports = explode(',', $_SERVER['HTTP_X_FORWARDED_PORT']); | |
error_log( 'The forwarded Port var is set to: ' . $ports[0] ); | |
} else if ( isset( $_SERVER['SERVER_PORT'] ) && ! empty( $_SERVER['SERVER_PORT'] ) ) { | |
error_log( 'The server Port var is set to: ' . $_SERVER['SERVER_PORT'] ); | |
$_SERVER['SERVER_PORT'] = 443; | |
} | |
} |