A Pen by Jesse Mann on CodePen.
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
| /** | |
| * Limit User to One Submission Per Time Period | |
| * http://gravitywiz.com/2012/04/25/limit-user-to-one-submission-per-time-period/ | |
| */ | |
| // update the "5" to your form ID | |
| add_action('gform_pre_render_5', 'gform_limit_submissions'); | |
| function gform_limit_submissions($form){ | |
| global $wpdb; | |
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 | |
| /* | |
| Template Name: Gravity Form | |
| */ | |
| get_header() ; ?> | |
| <link type="text/css" rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/easy-responsive-tabs.css" /> | |
| <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/css/style.css"> | |
| <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/css/responsive.css" media="screen" > |
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
| <link rel="stylesheet" href="<?php bloginfo(template_url); ?>/css/colorbox.css" /> | |
| <script src="<?php bloginfo(template_url); ?>/jquery.colorbox-min.js"></script> | |
| <?php | |
| /** | |
| * Page Template | |
| * | |
| * This template is the default page template. It is used to display content when someone is viewing a | |
| * singular view of a page ('page' post_type) unless another page template overrules this one. | |
| * @link http://codex.wordpress.org/Pages |
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 //echo wpufe_can_post(); | |
| global $user_ID; | |
| $recent = get_posts(array( | |
| 'author'=>$user_ID, | |
| 'orderby'=>'date', | |
| 'order'=>'desc', | |
| 'numberposts'=>1 | |
| )); | |
| if( $recent ){ |
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 the "5" to your form ID | |
| //add_action('gform_pre_render_1', 'gform_limit_submissions'); | |
| function gform_limit_submissions($form){ | |
| global $wpdb; | |
| $limit_message = 'You may only submit this form once every 24 hours.'; | |
| $limit_time = 86400; // must be specified in seconds; 86400 seconds is equal to 24 hours |
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
| itemDescription.replace(/[\u2018\u2019]/g, "'"); |
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 | |
| $thecart = json_encode($woocommerce->cart->get_cart()); | |
| $thecart = str_replace("'", "", json_encode($woocommerce->cart->get_cart(), JSON_HEX_APOS)); | |
| //$result = preg_replace("/[^a-zA-Z0-9]+/", "", $woocommerce->cart->get_cart()); | |
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
| jQuery(window).scroll(function () { | |
| var scrollTop = jQuery(window).scrollTop(); | |
| //elementOffset = $('#my-element').offset().top, | |
| // distance = (elementOffset - scrollTop); | |
| console.log(scrollTop); | |
| if(scrollTop > 120 ) { console.log('stop div'); | |
| jQuery('#masthead').css('position','fixed'); |
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
| if(tribe_is_month()) { | |
| echo 'Calendar Grid'; | |
| } else if(tribe_is_event() && !tribe_is_day() && !is_single()) { | |
| echo 'Event List'; | |
| } else if(tribe_is_event() && !tribe_is_day() && is_single()) { | |
| echo 'Single Event'; | |
| } else if(tribe_is_day()) { | |
| echo 'Single Day'; | |
| } else { | |
| the_title(); |
OlderNewer