- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Fix bbPress roles for s2member | |
Plugin URI: http://roughsmootheng.in | |
Version: 1.0 | |
Description: This plugin adds s2member roles to the user_role_map for bbPress. | |
Author: Darren Ethier | |
Author URI: http://www.roughsmootheng.in | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This function just checks the incoming browser and will display a message if it's out of date. We save transients for the user-agents so we don't need to ping the WordPress api on every request. | |
* | |
* @return string html formatted message for user | |
*/ | |
function show_browser_message() { | |
//let's include the file that will has the wp function we need. | |
require_once( ABSPATH . 'wp-admin/includes/dashboard.php' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Must be in an external file or loaded at the end of wp_footer() | |
jQuery(document).ajaxSend(function(e, x, a) { | |
var awesome = 1; | |
a.data += '&' + jQuery.param( {is_awesome: awesome} ); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
- 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
- Compass - Open source CSS Authoring Framework.
- Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
- Font Awesome - The iconic font designed for Bootstrap.
- Zurb Foundation - Framework for writing responsive web sites.
- SASS - CSS extension language which allows variables, mixins and rules nesting.
- Skeleton - Boilerplate for responsive, mobile-friendly development.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('ABSPATH')) exit('No direct script access allowed'); | |
/* | |
Plugin Name: Fix wpMandrill. | |
Plugin URI: https://gist.github.com/nerrad/2686a4be42da2ca76047 | |
Description: wpMandrill doesn't setup formatted to field addresses to work correctly with the mandrill api. This fixes that. | |
Version: 1.0.0 | |
Author: Darren Ethier | |
Author URI: http://roughtsmootheng.in | |
License: GPLv2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This could be extrapolated and used for tags or any other taxonomy really. | |
*/ | |
add_action('init', 'category_cpt_rewrites'); | |
function category_cpt_rewrites() { | |
$custom_post_types = array('video', 'audio', 'photo', 'file'); //some example post types | |
foreach ( $custom_post_types as $post_type ) { | |
$rule = '^' . $post_type . '/category/(.+?)/?$'; |
Drop this file in your wp-content/mu-plugin
folder if you want to fire and forget or just into your wp-content/plugins
folder if you want to be able to activate.
Now that WordPress 5.0+ has the new block editor merged in, the Gutenberg plugin is for development of features that are not in WordPress core. Since I contribute to the plugin among other projects I do I find that sometimes I forget whether or not the GB plugin is active or not. So I created this handy snippet that inserts a GB is Active
indicator in the WordPress admin bar menu when the plugin is active.