Skip to content

Instantly share code, notes, and snippets.

View rogierborst's full-sized avatar

Rogier Borst rogierborst

  • Amersfoort, the Netherlands
View GitHub Profile
@rogierborst
rogierborst / gist:2786753
Created May 25, 2012 08:52 — forked from GaryJones/gist:1258784
Using the template_include filter in WordPress
<?php
add_filter( 'template_include', 'ja_template_include' );
function ja_template_include( $template ) {
if ( !is_category() )
return $template;
$category_info = get_category(get_query_var('cat'));
if ( $category_info->parent == 0 )
@rogierborst
rogierborst / $.slideUp on table rows.js
Last active April 8, 2023 19:56
Make table rows slideUp with jQuery
$('tr').children('td')
.animate({'padding-top' : 0, 'padding-bottom' : 0}) // first remove vertical padding
.wrapInner('<div />') // wrap contents in divs, because THOSE can be animated
.children()
.slideUp(function(){
$(this).closest('tr').remove();
});
@rogierborst
rogierborst / gist:5825989
Created June 20, 2013 19:46
The first and only acceptance test you'll ever need
$this->assertCompanyLogoIsReallyBig();
1) Always start your day with a failing test