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
/* global mejs, _wpmejsSettings */ | |
(function($) { | |
// add mime-type aliases to MediaElement plugin support | |
mejs.plugins.silverlight[0].types.push('video/x-ms-wmv'); | |
mejs.plugins.silverlight[0].types.push('audio/x-ms-wma'); | |
$(function() { | |
var currentID, | |
settings = { | |
success: function(media, node, player) { |
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
add_action( 'init', 'rg_deregister' ); | |
function rg_deregister() { | |
wp_deregister_script( 'mediaelement' ); | |
wp_register_script( 'mediaelement', get_template_directory_uri() . '/_ui/js/mediaelement-and-player.min.js', array( 'jquery' ) ); | |
wp_register_script( 'mediaelement-featuredection', get_template_directory_uri() . '/_ui/js/me-featuredetection.js', array( 'mediaelement' ) ); | |
wp_enqueue_script( 'mediaelement-featuredection' ); |
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
<form method="post" enctype="multipart/form-data" id="gform_1" action="/beantown/wp/contact-us/"> | |
<div class="gform_body"> | |
<ul id="gform_fields_1" class="gform_fields left_label description_below"><li id="field_1_11" class="gfield gsection"><h2 class="gsection_title">We'd love to hear from you!</h2><div class="gsection_description"><div class="vcard"><span class="fn">Erica Voigt</span> | |
<span>Proprietor</span><a class="email" href="mailto:[email protected]">[email protected]</a> | |
<a class="tel" href="tel:+16179369047">617.936.9047</a> | |
</div></div></li><li id="field_1_12" class="gfield"><label class="gfield_label" for="input_1_12">First name</label><div class="ginput_container"><input name="input_12" id="input_1_12" type="text" value="" class="medium" tabindex="1"></div></li><li id="field_1_13" class="gfield"><label class="gfield_label" for="input_1_13">Last name</label><div class="ginput_container"><input name="input_13" id="input_1_13" ty |
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 | |
add_filter( 'gform_field_input', 'gf_field_input', 10, 5 ); | |
wp_enqueue_script( 'jquery-ui-datepicker' ); | |
/** | |
* Overwrite gravity forms input field | |
* | |
* @hook gform_field_input |
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 | |
add_action( 'gform_pre_submission_1', 'gf_form_pre_submission' ); | |
/** | |
* Presubmission form handler | |
* | |
* @hook gform_pre_submission | |
*/ | |
function gf_form_pre_submission($form) { |
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 | |
add_action( 'wp_head', 'gf_trigger_picker' ); | |
/** | |
* Inject js code into the head, used with ACF | |
* @hook wp_head | |
*/ | |
function gf_trigger_picker() { | |
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 | |
add_filter( 'gform_field_input', 'gf_field_input', 10, 5 ); | |
function gf_field_input($input, $field, $value, $lead_id, $form_id) { | |
// we don't want to change the admin look behavior of the form field | |
if ( IS_ADMIN ) | |
return $input; | |
// lets create custom form html in case it had the css class assigned |
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
* { | |
color: blue; | |
} |
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 | |
/** | |
* Loop Add to Cart | |
* | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 1.6.4 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
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
$('body').on('adding_to_cart', function(event, param1, param2) { | |
// pick the data from somewhere and define extra product_data parameter | |
// event and param1 parameteres serve no need in that case | |
param2.logo_text = 'My great logo!'; | |
}); |