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
// webpack is a module bundler | |
// This means webpack takes modules with dependencies | |
// and emits static assets representing those modules. | |
// dependencies can be written in CommonJs | |
var commonjs = require("./commonjs"); | |
// or in AMD | |
define(["amd-module", "../file"], function(amdModule, file) { | |
// while previous constructs are sync | |
// this is async |
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 | |
/** | |
* Gravity Forms Easy Form Population | |
* | |
* Populate form fields with values from a previous form entry. | |
* | |
* @version 1.0 | |
* @author Travis Lopes <[email protected]> | |
* @license GPL-2.0+ | |
* @link http://travislop.es/ |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//required plugins: code snippets, caldera forms, caldera forms run action | |
add_action('consult_req_submitted', 'consult_req_submitted_sync_hubspot'); | |
function consult_req_submitted_sync_hubspot( $data ){ | |
$hubspot_api_key = 'ffffffff-27a0-4591-9b68-27d4bb31ed76'; | |
$hubspot_list_id = '1'; //optional |
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 | |
// Usage: [hubspot_form form_id="1234-5678-90123-45676"] | |
// Inspiration: https://rschu.me/an-easy-way-to-embed-hubspot-forms-in-wordpress/ | |
// API Documentation: http://developers.hubspot.com/docs/methods/forms/advanced_form_options | |
add_shortcode('hubspot_form', function($atts) { | |
extract(shortcode_atts(array( | |
'form_id' => null, | |
'redirect_url' => null |
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 to cart redirect to checkout. | |
* | |
* @param string $url | |
* @return string | |
*/ | |
function my_wc_add_to_cart_redirect_to_checkout( $url ) { | |
return wc_get_checkout_url(); |
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
WebFontConfig = { | |
google: { families: [ \'Ek+Mukta:200,800:latin\' ] } | |
}; | |
var cb = function() { | |
var wf = document.createElement(\'script\'); | |
wf.src = \'//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js\'; | |
wf.type = \'text/javascript\'; | |
wf.async = \'true\'; | |
var s = document.getElementsByTagName(\'script\')[0]; | |
s.parentNode.insertBefore(wf, s); |
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
// Place this in wp-config | |
define( 'ACF_5_KEY', 'yourkeyhere' ); | |
// Set ACF 5 license key on theme activation. Stick in your functions.php or equivalent. | |
function auto_set_license_keys() { | |
if ( ! get_option( 'acf_pro_license' ) && defined( 'ACF_5_KEY' ) ) { | |
$save = array( | |
'key' => ACF_5_KEY, |
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
.gform_ajax_spinner { | |
margin-left: 20px; /* give it some space from the Submit button */ | |
border: 4px solid rgba(255, 255, 255, 0.3); /* match with border-left */ | |
border-left: 4px solid gold; | |
animation: spinner 1.1s infinite linear; | |
border-radius: 50%; | |
width: 30px; /* match with height for a circle */ | |
height: 30px; | |
} | |
@keyframes spinner { |
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
function gf_spinner_replace( $image_src, $form ) { | |
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; // relative to you theme images folder | |
} | |
add_filter( 'gform_ajax_spinner_url', 'gf_spinner_replace', 10, 2 ); |
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('woocommerce_order_actions', 'custom_wc_order_action', 10, 1 ); | |
function custom_wc_order_action( $actions ) { | |
if ( is_array( $actions ) ) { | |
$actions['custom_action'] = __( 'My custom action' ); | |
} | |
return $actions; | |
} |
OlderNewer