Skip to content

Instantly share code, notes, and snippets.

@bdnorris
bdnorris / navigation.php
Created July 21, 2023 16:08
WordPress filter to replace top level menu items with buttons
<?php
function edit_menu_item($item_output, $item) {
if ( in_array('menu-item-has-children', $item->classes) ) {
return '<button type="button" aria-expanded="false" id="' . $item->title . '-' . $item->ID . '">'.$item->title.'</button>';
}
return $item_output;
}
add_filter('walker_nav_menu_start_el','edit_menu_item', 10, 2);
@bdnorris
bdnorris / functions.php
Last active August 27, 2019 19:43
GF100 Years Gravity Forms
<?php
/**
* _griffith functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package _griffith
*/
if ( ! function_exists( '_griffith_setup' ) ) :
@bdnorris
bdnorris / keybase.md
Last active February 4, 2019 14:49
keybase.md

Keybase proof

I hereby claim:

  • I am bdnorris on github.
  • I am bnorris (https://keybase.io/bnorris) on keybase.
  • I have a public key whose fingerprint is FF38 9A67 5733 F9CF ADF5 7E3B D976 EA95 C5F2 1278

To claim this, I am signing this object: