Polyhistoric Man Of The Web

Category: Code

  • Flot – sexy graphs created in JavaScript

    I recently had the opportunity to speak at the DC jQuery User Group during an entire meetup dedicated to charts and graphs. Russel Heimlich presented on Google Charts and Chris Bannon presented on Wijmo while I had the honor to present on Flot. When AddThis switched to Flot, I had a chance to build some […]

  • Always check your diffs

    One habit that I’ve gotten into that has saved me from looking like an idiot nearly as often is to always look at a diff before I commit. I don’t do this as much in Mercurial, but with SVN when you do automatic deployments to testing servers, a stray alert in your javascript or var_dump […]

  • Adding a twitter box to the Profile page in WordPress

    I haven’t used AIM in years and I haven’t used Yahoo Messager in even longer.  What I do use is twitter.  Therefore, having a box in the WordPress admin for twitter name is better and with some code I wrote for the

  • Add Role

    This simple plugin, built for my WordPress DC Presentation on the Users API adds a role called link master, that gets the capability to edit links and also read private posts and pages and also removes the ability for editors to manage categories.

  • Personalized Read More

    Want to make the read more link in WordPress call out the user if they are logged in?  As part of my DC WordPress presentation, i showed that it’s easy as pie and only about 10 lines of code.

  • WordPress Shortcodes for Users and Non Users

    One of the plugins I wrote for the DC WordPress group’s meeting on Users / Roles / Capabilities demonstrates how to create shortcode that makes some content only visable by users with a certain capability and other content only visable to non logged in viewers.  You can download Shortcodes for Discrimination (along with the other […]

  • Remove all default header images in a Twenty Ten Child Theme

    Despite the beauty of (and cool stories behind) the default images in twenty ten, If you’re building a twenty ten child theme, there is a chance that you won’t want them to appear as options on the custom header screen. This simple snippit of code in your child theme’s functions.php file will deregister the default […]

  • How to remove a nav menu location in WordPress 3.0.0

    This function is in WordPress 3.0.1. You can now just call unregister_nav_menu and don’t need to put it in your child theme One of the great additions to WordPress 3.0 is navigation menus.  One of the aspects that it contains is the ability for a theme to register a nav menu location and for the […]

  • PHPXref for WordPress, BuddyPress, bbPress and Thematic: Local and Updated

    I often am working on a variety of WordPress, BuddyPress, and BBPress projects and enjoy working from a lot of not internet connected locations such as trains, buses, parks and the occasional rooftop. As such it’s very handy for me to a local version of PHPXref documents for the current trunk of these products. I’ve […]

  • Dirty Ten, a Twenty Ten Child Theme using Output Buffers

    After making Thirty Ten, my first Twenty Ten Child Theme, Devin Price asked for an example of a child theme that used output buffers.I’m not a big fan of using output buffers in my themes, but it’s a worthwhile trick to have in your bag. There are two main reasons for this: It makes code […]