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
/** | |
* Fires after a payment has been completed | |
* | |
* @param array $entry The Entry object | |
* @param array $action The Action Object | |
* $action = array( | |
* 'type' => 'cancel_subscription', // See Below | |
* 'transaction_id' => '', // What is the ID of the transaction made? | |
* 'subscription_id' => '', // What is the ID of the Subscription made? | |
* 'amount' => '0.00', // Amount to charge? |
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
/** | |
* Send a notification after a user attempts a purchase | |
* | |
* @param $entry The Entries object | |
* @param array $action The Action Object | |
* $action = array( | |
* 'type' => 'cancel_subscription', // See Below | |
* 'transaction_id' => '', // What is the ID of the transaction made? | |
* 'subscription_id' => '', // What is the ID of the Subscription made? |
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 | |
/** | |
* Automatically login a single WordPress user upon arrival to a specific page. | |
* | |
* Redirect to home page once logged in and prevent viewing of the login page. | |
* Compatible with WordPress 3.9.1+ | |
* Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead." | |
* Updated 2019-07-09 to reformat code, pass 2nd parameter to `do_action()`, and hook into priority 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
(function($){ | |
$.fn.quantityDiscounts = function(options) { | |
// set up default options | |
var defaults = { | |
discountColor: '#FF0000', | |
discounts: [ | |
{ limit: 174, discount: .75, text: "25% Discount Applied"}, | |
{ limit: 139, discount: .80, text: "20% Discount Applied"}, |
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
# install Homebrew if you don't already have it: http://mxcl.github.io/homebrew/ | |
# install nano from homebrew | |
brew install nano | |
# update your nanorc file with the contents of the nanorc file below | |
nano ~/.nanorc | |
# close and re-open your terminal and you'll have syntax highlighting |
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
(function($){ | |
$.fn.quantityDiscounts = function(options) { | |
// set up default options | |
var defaults = { | |
discountColor: '#FF0000', | |
discounts: [ | |
{ limit: 174, discount: .75, text: "25% Discount Applied"}, | |
{ limit: 139, discount: .80, text: "20% Discount Applied"}, |
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
development: | |
store: example.myshopify.com | |
password: add-password-in-config | |
theme_id: "live" | |
bucket_size: 40 | |
refill_rate: 2 | |
ignore_files: | |
- "*.swp" | |
- "*~" | |
- "config/settings_data.json" |
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 | |
//* Using the Gravity Forms editor, be sure to check "Allow field to be populated dynamically under Advanced Options | |
//* You will need to set the Field Parameter Name value to work with the filter as follows: gform_field_value_$parameter_name | |
//* Dynamically populate first name for logged in users | |
add_filter('gform_field_value_first_name', 'populate_first_name'); | |
function populate_first_name($value){ | |
global $current_user; | |
get_currentuserinfo(); | |
return $current_user->user_firstname; |
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
describe('conditional testing', function() { | |
it('should be able to test conditionally', function() { | |
browser.get('http://www.angularjs.org'); | |
element(by.css('.theresnowaythisclassexists')).then( | |
function elementExists() { | |
expect(false).toBe(true); | |
}, | |
function elementDoesNotExist() { | |
expect(true).toBe(true); | |
} |
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 // custom functions.php template @ digwp.com | |
// add feed links to header | |
if (function_exists('automatic_feed_links')) { | |
automatic_feed_links(); | |
} else { | |
return; | |
} |
NewerOlder