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
| /* ------------------------------------------------- | |
| ** FLEXSLIDER CLEANUP | |
| ** ---------------------------------------------- */ | |
| .flexslider, .flexslider * { @include box-sizing('content-box'); } | |
| .flexslider { margin: 0; background: #fff; border: none; -webkit-border-radius: none; -moz-border-radius: none; -o-border-radius: none; border-radius: none; box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none; -o-box-shadow: none; z-index: 0; } | |
| .flex-direction-nav {*height: 0;} | |
| .flex-direction-nav a {width: 20px; height: 60px; margin: -23px 0 0 0; display: block; background: url(../img/bg_direction_nav.png) no-repeat 0 0; position: absolute; top: 160px; z-index: 10; cursor: pointer; text-indent: -9999px; opacity: 1; -webkit-transition: all .3s ease;} | |
| .flex-direction-nav .flex-next {opacity: .7;background-position: 100% 0; right: 0; } | |
| .flex-direction-nav .flex-prev {opacity: .7;left: 0;} | |
| .flexslider:hover .flex-next {opacity: 1; right: 0;} |
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
| $(window).load(function() { | |
| $('.flexslider-home').flexslider({ | |
| slideshowSpeed: 4000, | |
| animationSpeed: 800, | |
| // Primary Controls | |
| controlNav: true, | |
| directionNav: false, | |
| prevText: "Previous", | |
| nextText: "Next", |
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 $images = get_field('slider'); | |
| if( $images ): ?> | |
| <div id="slider" class="flexslider flexslider-home "> | |
| <ul class="slides"> | |
| <?php foreach( $images as $image ): ?> | |
| <li> | |
| <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> | |
| </li> | |
| <?php endforeach; ?> | |
| </ul> |
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
| class Mask { | |
| // get image and meta including title, alt, caption, and description | |
| function get_image( $size = null, $post_id = null ) | |
| { | |
| $img = wp_prepare_attachment_for_js(get_post_thumbnail_id($post_id)); | |
| if ($size != null) | |
| { | |
| if (!array_key_exists($size, $img['sizes'])) |
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
| // accordion | |
| (function(){ | |
| $('.accordion-section').hide(); | |
| $('.accordion-heading').click(function(){ | |
| var clicks = $(this).data('clicks'); | |
| if (!clicks) { | |
| $(this).addClass('selected'); | |
| $(this).next('.accordion-section').addClass('selected').slideDown(); | |
| $(this).parent().siblings().children('.accordion-heading').removeClass('selected').removeData('clicks'); | |
| $(this).parent().siblings().children().siblings().children().children().children('.accordion-heading').removeClass('selected').removeData('clicks'); |
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
| // place gravity form descriptions above the fields | |
| $('.gfield_description').each(function(i,e){ | |
| $(e).css({'padding-bottom': '5px'}); | |
| sublabel = $('<label>').append($(e).clone()).remove().html(); | |
| $(e).siblings('label').after(sublabel); | |
| $(e).remove(); | |
| }); |
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
| $('.parent').click(function(){ | |
| if ($(this).has('click-child')) { | |
| $(this).find('.child').click(); | |
| }; | |
| }); |
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 | |
| /** | |
| * gets the current post type in the WordPress Admin | |
| */ | |
| function get_current_post_type() { | |
| global $post, $typenow, $current_screen; | |
| //we have a post so we can just get the post type from that | |
| if ( $post && $post->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
| String.prototype.hashCode = function(){ | |
| var hash = 0, i, char; | |
| if (this.length == 0) return hash; | |
| for (i = 0, l = this.length; i < l; i++) { | |
| char = this.charCodeAt(i); | |
| hash = ((hash<<5)-hash)+char; | |
| hash |= 0; // Convert to 32bit integer | |
| } | |
| return hash; | |
| }; |
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
| #!/usr/bin/env ruby | |
| Encoding.default_external = Encoding::UTF_8 | |
| Encoding.default_internal = Encoding::UTF_8 | |
| def fix_file file | |
| text = File.read file | |
| fixed = fix_serialization text |