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
# Steps we will take: | |
# 1. Change Local (Docker Machine) image type (this will take a bit) | |
# 2. Resize image | |
# 3. Resize partion | |
# | |
# Also see: https://docs.docker.com/articles/b2d_volume_resize/ | |
# IMPORTANT: Make sure Local is not running! | |
VM_NAME="local-by-flywheel" | |
NEW_DISK_SIZE=50000 |
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
define('WP_DEBUG', true); | |
define('SCRIPT_DEBUG',true); | |
if ( WP_DEBUG ) { | |
// Enable Debug logging to the /wp-content/debug.log file | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', true ); | |
@ini_set( 'log_errors', 'On' ); | |
@ini_set( 'display_errors', 'Off' ); | |
@ini_set( 'error_reporting', E_ALL ); | |
@ini_set( 'error_log', 'php_error.log' ); |
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
#!/usr/bin/env bash | |
# =============================================================================== | |
# Script to install PHPUnit in the Local by Flywheel Mac app | |
# These packages are installed | |
# | |
# PHPUnit, git, subversion, composer, curl and wget | |
# | |
# WordPress and the WP_UnitTestCase are installed in the /tmp directory | |
# The $WP_CORE_DIR and $WP_TESTS_DIR variables are added to the .bashrc file |
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
#Example moving the DPSG Global Library | |
# 1 Checkout the Beanstalk Repo | |
git clone --bare [email protected]:/dpsg-global-library.git | |
# 2 Push into your desired GitHub repo. (Please note that you must create the github repo prior to this step) | |
git push --mirror [email protected]:codeandtheory/dpsg-global-library.git |
This is a simplified showcase of how you can easily build your own Optin form in WordPress.
It can connect to any API that supports cURL (most of them do). There is no error reporting implemented. It uses exit intent detection script called Ouibounce, which needs to be enqueued in your functions.php
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 | |
/** | |
* start the customisation | |
*/ | |
function custom_woo_before_shop_link() { | |
add_filter('woocommerce_loop_add_to_cart_link', 'custom_woo_loop_add_to_cart_link', 10, 3); | |
add_action('woocommerce_after_shop_loop', 'custom_woo_after_shop_loop'); | |
} | |
add_action('woocommerce_before_shop_loop', 'custom_woo_before_shop_link'); |
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 | |
/* | |
Author: Doug Edgington | |
Description: modified version of Woocomemrce SSL functionality, forces ssl on Woocommerce pages and two additional custom pages | |
*/ | |
function dee_ssl_template_redirect() { | |
if ( ! is_ssl() ) { | |
if ( is_checkout() || is_account_page() || is_woocommerce() ) { |
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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
NewerOlder