Skip to content

Instantly share code, notes, and snippets.

( function($) {
'use strict';
$.fn.ToggleTabMenu = function() {
function Tab( el ) {
var tab = {
init : function( el ) {
this.$el = $( el );
this.cacheDom();
},
cacheDom : function() {
@bob-moore
bob-moore / widget_title_filter.php
Last active March 3, 2016 17:41
Filter for removing widget titles that start with !
<?php
if( !function_exists( 'mpress_remove_widget_titles' ) ) {
function mpress_remove_widget_titles( $widget_title ) {
if( substr( $widget_title, 0, 1 ) === '!' ) {
return;
}
return $widget_title;
}
add_filter( 'widget_title', 'mpress_remove_widget_titles' );
@bob-moore
bob-moore / wp-query-ref.php
Created February 25, 2016 14:12 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@bob-moore
bob-moore / mobile_dropdown.js
Created January 15, 2016 15:05
Hover Touch Menu THingy
jQuery( document ).ready(function($) {
'use strict';
if (!Modernizr.touch) {
return;
}
var link = $(menu_item).children( 'a' );
var sub_menu = $(menu_item).children( 'ul' );
$( link ).on( 'click', function( e ) {
if( $(sub_menu).css('visibility') == 'hidden' ) {
@bob-moore
bob-moore / 0_reuse_code.js
Last active August 29, 2015 14:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console