Skip to content

Instantly share code, notes, and snippets.

Gabe Shackle hereswhatidid

Block or report user

Report or block hereswhatidid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hereswhatidid
hereswhatidid / interchange-attachments.php
Created Jul 15, 2015
Apply Foundation Interchange parameters to attachment images via filter
View interchange-attachments.php
<?php
add_filter('wp_get_attachment_image_attributes', 'interchange_the_images', 10, 2);
function interchange_the_images ( $attr, $attachment )
{
/* Use ID to get the attachment object */
$lg_hero_array = wp_get_attachment_image_src( $attachment->ID, 'large', true ); //Large Hero
$md_hero_array = wp_get_attachment_image_src( $attachment->ID, 'medium', true ); // Medium Hero
$sm_hero_array = wp_get_attachment_image_src( $attachment->ID, 'thumbnail', true ); // Mobile Hero
@hereswhatidid
hereswhatidid / localize-bootstrap.less
Last active Sep 19, 2015
Localize Bootstrap 3+ styles to a container div.
View localize-bootstrap.less
.bootstrap-wrapper {
@import (less) url( '../vendor/bootstrap/bootstrap.css' );
}
@hereswhatidid
hereswhatidid / HTMLElements.html
Created Apr 5, 2012
Styleguide of HTML Elements
View HTMLElements.html
<!-- Sample Content to Plugin to Template -->
<h1>CSS Basic Elements</h1>
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p>
<hr />
<h1 id="headings">Headings</h1>
<h1>Heading 1</h1>
@hereswhatidid
hereswhatidid / jquery.placeholder.js
Created Jun 14, 2012
Check for and enable HTML5 placeholder attribute
View jquery.placeholder.js
$.support.placeholder = ('placeholder' in document.createElement('input'));
if (!$.support.placeholder) {
$('input[placeholder],email[placeholder]').each(function() {
$(this)
.val($(this).attr('placeholder'))
.on({
'focus': function() {
if ($(this).val() == $(this).attr('placeholder')) $(this).val('');
},
'blur': function() {
View jquery.rotator.js
(function( $ ){
$.fn.rotateit = function( options ) {
//
// Plugin settings with defaults set
//
// -----------------------------------------------------
var settings = $.extend( {
'shownav' : true,
'backnext' : false,
@hereswhatidid
hereswhatidid / clickbodytohide.js
Created Jul 26, 2012
Model click to remove scripts
View clickbodytohide.js
$('html').click(function() {
//Hide the menus if visible
});
$('#menucontainer').click(function(event){
event.stopPropagation();
});
@hereswhatidid
hereswhatidid / Container.ascx
Created Aug 7, 2012
Add class to outer div in DotNetNuke containers
View Container.ascx
<%@ Control language="c#" AutoEventWireup="true" Explicit="True" Inherits="DotNetNuke.UI.Containers.Container" %>
<%@ Register TagPrefix="dnn" TagName="TITLE" Src="~/Admin/Containers/Title.ascx" %>
<script runat="server">
protected void Page_PreRender(object sender, EventArgs e) {
try {
HtmlGenericControl cParent = (HtmlGenericControl) this.Parent;
cParent.Attributes["class"] += " tab";
} catch (Exception ex) {
// do nothing
}
@hereswhatidid
hereswhatidid / tabs.js
Created Aug 7, 2012
Create Tabs from divs
View tabs.js
//
// Tabbed containers
//
// -----------------------------------------------------
if ($('.tab').length > 1) {
var tabnav = $('<div class="tabs-nav"><ul /></div>'),
tabs = $('<div class="tabs" />'),
tabobject = $('<div class="tabbed-content span9" />'),
activefound = false,
tabwidth = 100 / $('.tab').length;
@hereswhatidid
hereswhatidid / web.config
Created Sep 18, 2012
IIS config file for setting cache header expiration
View web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="14.00:00:00" />
</staticContent>
</system.webServer>
</configuration>
@hereswhatidid
hereswhatidid / nav.walker.blank.php
Created Dec 7, 2012
WordPress blank navigation walker
View nav.walker.blank.php
<?php
//
// Blank navigation list Walker
//
// -----------------------------------------------------
class Blank_Walker extends Walker_Nav_Menu
{
/**
* Start the element output.
*
You can’t perform that action at this time.