Skip to content

Instantly share code, notes, and snippets.

<?php
/*
Plugin Name: Instrument Hooks for WordPress
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook.
Version: 0.1
Author: Mike Schinkel
Author URI: http://mikeschinkel.com
*/
if (isset($_GET['instrument']) && $_GET['instrument']=='hooks') {
/**
* Bootstrap Walker for Wordpress Navigation Menu
*
* Extends WordPress walker class to add support for Twitter Bootstrap navigation menu and JS dropdowns.
* Caveats and features:
* - Only top level elements with children will be turned into dropdowns
* - Can be used in a Bootstrap nav but needs some CSS styling to improve presentation
* - With extra CSS multiple columns can be shown in a dropdown (sort of a simple mega-menu)
*
* Multi column dropdowns (mega-menu) via CSS:
@thecancerus
thecancerus / sequential.js
Created February 7, 2022 06:22 — forked from niraj-shah/sequential.js
Sequential Ajax Calls using jQuery
// parameters for ajax calls
var items = [
{ 'gender': 'male', 'nat': 'US' },
{ 'gender': 'female', 'nat': 'GB' }
];
// function to trigger the ajax call
var ajax_request = function(item) {
var deferred = $.Deferred();