There's a Function for That: More for Less with Core Functions
- WordPress
Abstract
WordPress Core carries a large catalog of functions that most developers never find, and hand-rolling what Core already ships is a habit worth breaking. This talk pulled the obscure and genuinely useful ones into the open: wp_list_pluck for pulling values out of a set of objects by key, current_filter for knowing which hook you are inside, wp_localize_script for handing structured data to JavaScript, and the query helpers behind caching an expensive wp_nav_menu call. The goal was fewer lines, fewer bugs, and code that reads the way Core does.
Links & resources
- WordCamp Seattle 2012: session page
- Errata on this site