Skip to content

Instantly share code, notes, and snippets.

Avatar
🤘
Rocking this project.

Mike Garrett MikeNGarrett

🤘
Rocking this project.
View GitHub Profile
View add_fields_to_bundle_programatically.php
<?php
/**
* This file will demonstrate a method to export fields to code.
* You can use this to easily create fields using the UI, export to code
* and then use in a custom module. Upon installation of the module
* your fields and instances will already be set up.
*/
// Create the fields you want using the Drupal UI.
// On the same site, go to example.com/devel/php
@MikeNGarrett
MikeNGarrett / Contract Killer 3.md
Last active Sep 19, 2016 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

View mobileNav.js
/*
mobileNav.js by Matt Jordan.
*/
(function($) {
$.fn.mobileNav = function(mobileWidth) {
// Create the <select> element
var selectHTML = '<select name="mobileNav" class="mobileNav" style="display:none">',
currentHref = window.location.href,
checkSize = function() {
@MikeNGarrett
MikeNGarrett / event-category-list.php
Created Aug 5, 2012 — forked from jo-snips/event-category-list.php
The Events Calendar: List Event Categories
View event-category-list.php
<?php // If you'd rather have category drop downs ?>
<form action="#" method="get" id="event-change">
<?php
$current = get_query_var('tribe_events_cat');
$terms = get_terms($tribe_ecp->get_event_taxonomy());
$count = count($terms);
if ( $count > 0 ){
echo '<select class="events-cat-menu"><option value="-1">All Events</option>';
// print_r($terms);
$selected = '';
You can’t perform that action at this time.