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 | |
/** | |
* Return search array | |
*/ | |
function loopconf_search_array( $search_hash ) { | |
// check for existence of unique transient | |
if ( false === ( $search_array = get_transient( 'loopconf_search_' . $search_hash ) ) ) { | |
global $wpdb; |
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
@mixin sprite-bg-size( $divisor: 2 ) { | |
$width: 240px; | |
$height: 360px; | |
$new-width: $width / $divisor; | |
$new-height: $height / $divisor; | |
background-size: round($new-width) round($new-height); | |
} |
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
function onHoverToggleTooltip( e ) { | |
var $this = $( this ), | |
title = $this.attr( 'title' ), | |
type = e.type, | |
offset = $this.offset(), | |
xOffset = e.pageX - offset.left + 10, | |
yOffset = e.pageY - offset.top + 30; | |
if( type == 'mouseenter' ) { | |
$this.data( 'tipText', title ).removeAttr( 'title' ); |
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
// blog title | |
function tammyhart_blog_title( $title = 'Blog' ) { | |
if ( get_option( 'show_on_front' ) == 'page' ) { | |
$page_id = get_option( 'page_for_posts' ); | |
$title = get_the_title( $page_id ); | |
} | |
if ( is_category() ) | |
$title = 'Category: ' . single_cat_title( '', false ); |
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
// labels | |
function inlineLabels() { | |
var $this = $( this ), | |
id = $this.attr( 'id' ), | |
$label = $( 'label[for=' + id + ']' ); | |
if ( $this.val() != '' ) | |
$label.css( 'opacity', 0 ); | |
$this.on( 'focus', function() { |
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
var windowWidth; | |
function setWidth() { | |
windowWidth = $( window ).width(); | |
} | |
setWidth(); | |
$( window ).resize( setWidth ); |
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
// iframes | |
var $iframes = $( document.querySelectorAll( '.videos iframe' ) ); | |
function iframeSizing() { | |
var $this = $( this ), | |
width = $this.width(), | |
height = $this.height(), | |
containerWidth = $this.parent().width(), | |
heightRatio = height / width, | |
newHeight = heightRatio * containerWidth; |
NewerOlder