Skip to content

Instantly share code, notes, and snippets.

@brianhall
brianhall / keybase.md
Created May 10, 2018 04:28
keybase.md

Keybase proof

I hereby claim:

  • I am brianhall on github.
  • I am brianhall (https://keybase.io/brianhall) on keybase.
  • I have a public key ASBLr1rnq_-OaoplH5qJojNOPVa6Ap-EBOlSgcMwJr8Pxwo

To claim this, I am signing this object:

@brianhall
brianhall / Font Awesome Menus in Wordpress
Created September 2, 2013 03:32
With great help from: http://stackoverflow.com/questions/12250866/how-to-add-custom-html-to-wp-nav-menu I needed a way to easily display / add updatable <i> elements inside of nav menu links in Wordpress. I hacked this filter together to help with that. Instructions: 1. Put the first portion of the code into functions.php. 2. Add the item you wi…
<?php
/***
* functions.php, overrides Walker_Nav_Menu from /wp-includes/nav-menu-template.php
***/
class Custom_Walker_Nav_Menu extends Walker_Nav_Menu {
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';