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 | |
if( function_exists('gravity_form') ) { | |
add_filter( 'gform_submit_button', 'form_submit_button', 10, 2 ); | |
add_filter( 'gform_init_scripts_footer', 'init_gform_scripts'); | |
} | |
/* | |
* Add framework classes to the submit buttons | |
*/ |
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
// Make form work with grid framework | |
$(document).bind('gform_post_render', function(){ | |
$('.gform_fields').addClass('grid'); | |
$('.gfield input, .gfield_html, .gfield textarea,.gfield select,.gfield h3, .gfield h2, .gfield p').each(function() { | |
if($(this).parents('.gfield').hasClass('cell')) { | |
} else if($(this).hasClass('small')) { |
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
jQuery(document).ready(function($) { | |
// When user resizes window... | |
$(window).on('resize',function() { | |
// Set interval until timer is cleared, indicating end of the resize event | |
waitForFinalEvent(function() { | |
// Get owl carousel | |
var owldata = $(".owl-carousel").data('owlCarousel'); |
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
/* Enqueue this in your admin JS file */ | |
jQuery(document).ready(function($) { | |
// minimize ACF flexible content layouts | |
$('.acf-flexible-content .layout[data-toggle=open]').find('.acf-fc-layout-handle').click(); | |
}); |
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 | |
/** | |
* Save the confirmation number of the wire transfer to the user's meta | |
*/ | |
add_action("gform_after_submission_12", "save_wire_transfer", 10, 2); | |
function save_wire_transfer($entry, $form){ | |
$current_user = wp_get_current_user(); | |
$user_id = $current_user->id; | |
//getting post |
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 | |
/* | |
* Friendly Date (WPML) | |
* Adds a date in the proper language based on a timestamp | |
* @param timestamp $timestamp A unix timestamp | |
* @param language $language The locale code. In most cases this will be ICL_LANGUAGE_CODE | |
* @param short $short The date format to output (eg: 'l F jS, Y') | |
*/ | |
function friendly_date_wpml($timestamp, $language, $short) { |
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
/*! | |
* _accordion.js | |
* | |
* It's an accordion built with jQuery! | |
* | |
* | |
$('.accordion').accordion(); | |
* |
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 | |
$content = get_sub_field('content'); | |
$title = get_sub_field('title'); | |
$position = get_sub_field('image_position'); | |
$image = get_sub_field('image')['url']; | |
if(!empty($title)) { | |
$title = "<h2 class='section__heading'>" . $title . "</h2>\r\n"; | |
} |
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
1. ZSH + Oh My ZSH | |
2. Ruby + RVM | |
3. OSX Config to reflect a developer's install | |
4. Sets Hostname | |
5. Homebrew | |
6. Python | |
7. Git & Github config file | |
8. Atom.io Editor | |
9. Homebrew Cask | |
10. Mongodb |
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
ul, ol { margin-bottom: 20px; } | |
ul { list-style: none outside; } | |
ol { list-style: decimal; } | |
blockquote { margin: 0 0 20px; padding: 9px 20px 0 19px;} | |
em { font-style: italic; } | |
strong { font-weight: bold; } | |
small { font-size: 80%; } |