Skip to content

Instantly share code, notes, and snippets.

<?php
// Nav Menu Dropdown Class
include_once( CHILD_DIR . '/lib/classes/nav-menu-dropdown.php' );
/**
* Mobile Menu
*
*/
function be_mobile_menu() {
<?php
/**
* Don't Update Plugin
*
* This prevents you being prompted to update if there's a public plugin
* with the same name.
*
* @since 1.0.0
* @author Mark Jaquith
@billerickson
billerickson / gist:1238281
Last active March 28, 2019 19:59
Customize Event Query using Post Meta
<?php
/**
* Customize Event Query using Post Meta
*
* @author Bill Erickson
* @link http://www.billerickson.net/customize-the-wordpress-query/
* @param object $query data
*
*/
@joshuadavidnelson
joshuadavidnelson / gravity-form-cmb2-options.php
Last active August 5, 2018 17:28
A function to return an array of gravity forms for a CMB2 select field.
<?php
/**
* Get an array of gravity forms.
*
* @since 1.0.0
*
* @return void
*/
function jdn_gf_options() {
$form_array = array();
@pjrvs
pjrvs / newslettercookie.html
Last active November 7, 2017 09:33
a jquery cookie that shows a signup form for people that aren't signed up and an alternate message for people that came from the list or signed up.
<!DOCTYPE html>
<html>
<head>
<title>jQuery Cookie + MailChimp</title>
<meta charset="utf-8">
</head>
<body>
<form action="XXX" method="post" class="signup">
@markrendle
markrendle / Git Bash.vbs
Created November 25, 2010 17:31
Modified Git Bash to use Console2
Set AppObj = CreateObject("Shell.Application")
If WScript.Arguments.Length=1 Then
AppObj.ShellExecute "C:\Console2\Console.exe", " -t ""Git Bash"" -d """ & WScript.Arguments(0) & """"
Else
AppObj.ShellExecute "C:\Console2\Console.exe", " -t ""Git Bash"""
End If
@thomasgriffin
thomasgriffin / gist:8012662
Last active December 31, 2015 16:19
REMOVE ALL THE METABOXES FROM ALL THE THINGS. WARNING: THIS THING IS VERY AGGRESSIVE.
<?php
add_action( 'add_meta_boxes', 'tgm_remove_all_the_metaboxes', 100 );
/**
* Removes all metaboxes except the ones I WANT ON MY POST TYPE. RAGE.
*
* This assumes a specific post type. In my case, it is 'envira'.
* This function is very aggressive and removes every single metabox minus
* the needed submitdiv metabox (which allows you to publish something) and
* the metaboxes that I register with my plugin.
*
<?php
// Disables sticky Strict Standards warnings. Good for poorly developed plugins.
// Put this file in mu-plugins
if ( WP_DEBUG ) {
error_reporting( E_ALL & ~E_STRICT );
}
@GaryJones
GaryJones / gist:5271998
Created March 29, 2013 16:41
Genesis workflow using GitFlow.

Genesis Framework workflow on GitHub

General procedure is to follow the established GitFlow model.

Initial Setup

Assuming the move happens right after 2.0.0 is released.

  • All SVN tags moved in as Git Tags.
  • Code SVN tagged as 2.0.0 moved to Git master branch
  • Git master branch is branched to develop.

If work after 2.0.0 has already been committed to SVN trunk, then SVN trunk is moved to Git develop branch instead.