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
| // linear-gradient([direction], [stop] [% or px], <[stop] [% or px]>+) | |
| // background: linear-gradient(left, rgba(255,0,0,0), red 50px, blue 100px, blue 200px, green ); | |
| #linear-grad { | |
| //top to bottom | |
| background: -webkit-linear-gradient(red, blue); /* For Safari 5.1 to 6.0 */ | |
| background: -o-linear-gradient(red, blue); /* For Opera 11.1 to 12.0 */ | |
| background: -moz-linear-gradient(red, blue); /* For Firefox 3.6 to 15 */ | |
| background: linear-gradient(red, blue); /* Standard syntax */ |
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
| //The following section is an add-on to this tutorial - https://tri.be/gravity-forms-events-calendar-submissions/ | |
| //Shout to CreativeSlice.com for their initial work | |
| /* Before Starting: | |
| - Make sure you have these three plugins installed | |
| - Gravity Forms | |
| - The Events Calendar | |
| - Gravity Forms + Custom Post Types | |
| - Once Gravity Forms is installed, create a form with these fields | |
| - Single Line Text (Event Title) | |
| - Paragraph Text (Event Description) |
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 this to your Genesis Theme Settings Page | |
| in the Header and Footer Scripts Section | |
| <script type="text/javascript"> //Be sure to add this before and after too */ | |
| jQuery(document).ready(function($){ | |
| $('a[href$="newtab"]').attr('target','_blank'); | |
| }); | |
| //</script> |
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 scripts for Gravity Forms | |
| gravity_form_enqueue_scripts( [gformid], true ); | |
| // Call function to add form to bottom of the entry | |
| // *** This only works if you're using a Genesis theme *** | |
| add_action( 'genesis_entry_footer', 'add_form_to_bottom', 5 ); | |
| // Return Gravity Form with specified ID to single listing CPT | |
| function add_form_to_bottom() { | |
| // bail if we aren't on a single listing CPT | |
| // Change 'listing' to post type |
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
| //Use correct selector | |
| $('.your-selector').text(function(){ | |
| return $(this).text().substr($(this).text().indexOf('insert-your-break-point-here')); | |
| }); |
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
| // onScreen jQuery plugin v0.2.1 | |
| // (c) 2011-2013 Ben Pickles | |
| // | |
| // http://benpickles.github.io/onScreen | |
| // | |
| // Released under MIT license. | |
| ;(function($) { | |
| $.expr[":"].onScreen = function(elem) { | |
| var $window = $(window) | |
| var viewport_top = $window.scrollTop() |
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
| // Update a List field in Gravity Forms | |
| //Change the '6' at the end to the correct form id | |
| add_action('gform_post_submission_6','update_list',10,2); | |
| function update_list($entry, $form){ | |
| $entry_id = $entry['id']; | |
| //print_r($entry); | |
| $list_values = array( | |
| array( | |
| 'Column 1' => 'one', | |
| 'Column 2' => 'two', |
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
| // Change the '9' at the end to the id of your form | |
| add_action('gform_post_submission_9','pullcsv',10,2); | |
| function pullcsv($entry, $form){ | |
| //Fields to change | |
| $file_field = 3; | |
| $text_field = 4; | |
| $entry_id = $entry['id']; | |
| $csv = $entry[$file_field]; //this returns a url string to the uploaded csv | |
| $row = 1; | |
| if (!empty($csv)){ |
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
| //remove everything (and including) before ":" | |
| <script type="text/javascript">jQuery(document).ready(function($){ | |
| $('.ai1ec-event-time').each(function(){ | |
| var str = $(this).html(); | |
| str = str.split(":").pop(); | |
| $(this).html(str); | |
| }); | |
| }); | |
| </script> |
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
| var $_GET = {}; | |
| document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function () { | |
| function decode(s) { | |
| return decodeURIComponent(s.split("+").join(" ")); | |
| } | |
| $_GET[decode(arguments[1])] = decode(arguments[2]); | |
| }); | |
| //This will either alert the "id" variable in the URL or return 'undefined' |