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
[{"id":"633128","field_id":"13","fields":{"3":{"id":"3","type":"select","label":"Are you a person or an organisation?","choices":{"1":{"default":"1","label":"I'm a Person","value":"","image":""},"2":{"label":"I'm Representing an Organisation","value":"","image":""}},"description":"","required":"1","size":"large","placeholder":"","css":"","dynamic_choices":""},"0":{"id":"0","type":"name","label":"What's your name?","format":"simple","description":"","required":"1","size":"large","simple_placeholder":"","simple_default":"","first_placeholder":"","first_default":"","middle_placeholder":"","middle_default":"","last_placeholder":"","last_default":"","css":""},"11":{"id":"11","type":"text","label":"What's your organisation's name?","description":"","required":"1","size":"medium","placeholder":"","default_value":"","css":"","input_mask":"","conditional_logic":"1","conditional_type":"show","conditionals":[[{"field":"3","operator":"==","value":"2"}]]},"12":{"id":"12","type":"text","label":"VAT number for your organisa |
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
$(window).on("scroll", function() { | |
var scrollHeight = $(document).height(); | |
var scrollPosition = $(window).height() + $(window).scrollTop(); | |
if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
// when scroll to bottom of the page | |
} | |
}); |
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 | |
/** | |
* The Template for displaying a post when called. | |
* | |
* This template can be overridden by copying it to yourtheme/auto-load-next-post/content-alnp.php. | |
* | |
* HOWEVER, on occasion Auto Load Next Post will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. I try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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 | |
// Add the action setting | |
add_filter( 'wc_points_rewards_action_settings', 'points_rewards_newsletter_action_settings' ); | |
function points_rewards_newsletter_action_settings( $settings ) { | |
$settings[] = array( | |
'title' => __( 'Points earned for newsletter signup' ), | |
'desc_tip' => __( 'Enter the amount of points earned when a customer signs up for a newsletter via MailChimp.' ), |
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
/** | |
* Add theme support for Auto Load Next Post by setting the | |
* theme selectors to be applied once the theme is activated. | |
*/ | |
function add_alnp_theme_support() { | |
add_theme_support( 'auto-load-next-post', array( | |
'content_container' => 'main.site-main', | |
'title_selector' => 'h1.entry-title', | |
'navigation_container' => 'nav.post-navigation', | |
'comments_container' => 'div#comments', |
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 | |
set -e | |
git config --local include.path ../.gitconfig | |
echo "Your local .gitconfig is now setup!" | |
exit 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
[alias] | |
# Creates a new branch on your local machine and switches into this branch. | |
newbie = "!git checkout -b $(git branch-name)" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" | |
# Delete the remote version of the current branch | |
unpublish = "!git push origin :$(git branch-name)" |
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
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] | |
RewriteCond %{HTTPS} on | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] |
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
add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11); | |
function dequeue_woocommerce_cart_fragments() { | |
if ( is_front_page() ) { | |
wp_dequeue_script('wc-cart-fragments'); | |
} | |
} |
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 | |
# Installation: | |
# Install the script in one of the folders in your PATH. Make sure it has execute permissions (i.e. chmod +x wp-install-core-sub-dir). | |
#Usage: | |
# $ mkdir mysite | |
# $ cd mysite |