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
for d in */ ; do echo "Checking for changes in $d..."; cd $d; if [[ `git status --porcelain` ]]; then echo "\033[0;32mChanges found in $d\033[0m"; fi; cd ../; done |
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
// BUG | |
// Sometimes a newly opened modal sets the image height to zero | |
// Stupid ios menu bar showing/hiding counts as a screen resize | |
// Can't calculate height with padding before resize to adjust top positioning | |
// - After resize, calculate the difference between the height of the content | |
// and the height of the image-holder and set the top of the content to | |
// scrollTop + the difference in top 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
/* | |
* jQuery wrap text plugin | |
*/ | |
;(function($) { | |
function WrapText(options) { | |
this.options = $.extend({ | |
holder: '.wrap-text', | |
wrapBefore: '<span>', | |
wrapAfter: '</span>', | |
wrapTag: 'span', |
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 sticky box plugin | |
*/ | |
;(function($, $win) { | |
'use strict'; | |
function StickyScrollBlock($stickyBox, options) { | |
this.options = options; | |
this.$stickyBox = $stickyBox; | |
this.init(); |
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 Open/Close plugin | |
*/ | |
;(function($) { | |
function OpenClose(options) { | |
this.options = $.extend({ | |
addClassBeforeAnimation: true, | |
hideOnClickOutside: false, | |
activeClass: 'active', | |
opener: '.opener', |
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
/* | |
* Responsive Layout helper | |
*/ | |
ResponsiveHelper = (function($){ | |
// init variables | |
var handlers = [], | |
prevWinWidth, | |
win = $(window), | |
nativeMatchMedia = 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
<?php | |
/** | |
* Customized version of the Category Filter that includes CSS classes for subcategories | |
* New filter available in WP-Admin > Events > Settings > Filters | |
*/ | |
if ( class_exists( 'Tribe__Events__Filterbar__Filters__Category' ) ) { | |
class Tribe__Events__Filterbar__Filters__Category_Custom extends Tribe__Events__Filterbar__Filters__Category { |
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 | |
// Displays numeric pagination links | |
function numeric_pagination($query = null, $echo = true) { | |
if (!$query) { | |
global $wp_query; | |
$query = $wp_query; | |
} | |
$total_pages = $query->max_num_pages; | |
$big = 999999999; // need an unlikely integer |
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 | |
// Returns true or false depending on if a post's $field_name ACF field contains the $layout_name(s) flexible layout | |
function have_flexible_layout($field_name, $layout_name, $post_id = false) { | |
if (function_exists('have_rows') && have_rows($field_name, $post_id)) { | |
while (have_rows($field_name, $post_id)) { | |
the_row(); | |
if (in_array(get_row_layout(), (array) $layout_name)) { | |
reset_rows(); | |
return true; |
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 git-lowercase-file { | |
tmp="tmp-$RANDOM-$1" | |
new=$(echo "$1" | tr '[:upper:]' '[:lower:]') | |
git mv -f $1 $tmp | |
git mv -f $tmp $new | |
} |
NewerOlder