WordPress 2.7 requires that plugins explicitly white list their options using a couple new functions. WordPress MU has required this security measure for a while, and it’s nice to see an evolved form of it brought to the core code. [Migrating Plugins and Themes to 2.7][1] article in the codex offers some guidance, but here’s how it works:
First, register each option for your plugin during the admin_init action:
``` function myplugin_admin_init(){ register_setting( 'my-options-group', 'my-option-name-1', 'absint' ); register_setting( 'my-options-group', 'my-option-name-2', 'wp_filter_nohtml_kses' ); } add_action( 'admin_init', 'myplugin_admin_init' ); ``` |
In the example above, the value for my-option-name-1
will be filtered by absint
before being saved to the options table. my-option-name-2
will be stripped of any HTML by wp_filter_nohtml_kses
.
Then build a form like this prototype:
```
Quizzes Are Good Link BaitVia Information Nation: How Long Could You Survive Chained to a Bunk Bed with a Velociraptor? and How Many Five Year Olds Could You Take in a Fight?. » about 100 words The Social Beaver: 1960s Campus Life At MITReally, it’s titled “The Social Beaver,” though I can’t imagine campus life ever looking like that. Aside: MIT’s TechTV is powered by Viddler’s white-label solutions. Woodman Institute, Dover, NHThe Woodman Institute Museum in Dover NH is famous for having a four-legged chicken, but that’s only a small example of the weirdness you’ll find inside. A big collection of snakes and bugs and bears in top hats along with other examples of taxidermy fills the first two floors. The top floor is dedicated to […] » about 100 words What Could Have Been: Lee Mercer’s 2008 Presidential CampaignFormer 2008 Presidential Candidate Lee Mercer shares your concern for circumstances and issues. He wants to crack down on treason and recognizes Democratic concerns about expansion of executive power. » about 100 words MySQL 5.1 Released, Community Takes StockMySQL 5.1 is out as a GA release, but with crashing bugs that should give likely users pause. Perhaps worse, the problems are blamed on essential breakdowns in the project management: “We have changed the release model so that instead of focusing on quality and features our release is now defined by timeliness and features. Quality is not regarded to be that important.” Still, people are finding inspiration in OurDelta and Drizzle. Competition from those braches/forks and criticism from the community are sure to help re-align the MySQL core, or provide a reasonable alternative if Sun/MySQL can’t deliver. In the meanwhile, the High Availability MySQL blog is worth following. SIMILE Timeline For, Um, TimelinesTimeline is a SIMILE project that uses Exhibit JSON (which you can create with Babel). » about 100 words Longwell RDF Browser
Another Approach To Web FormsJust saw a cool demo of XForms and Orbeon Forms. WordPress For Zach’s Web Programming ClassZach is apparently too lazy to prep his own lectures for the last few days of his intro to web programming class. After bringing his students from zero to database-backed web-apps, he asked Matt do JavaScript and me to introduce WordPress as an application platform. The WordPress API makes it easy to write plugins that […] » about 300 words Real Data Architecture: Stockholm Data CaveNeed a retro-looking bomb shelter for your server, or are you a big fan of the Cheyenne Mountain scenes in WarGames? The Bahnhof Pionen White Mountains hosting facility is a cave below Stockholm. You’d expect the sysadmin blogs to call it fit for a James Bond villain, but even the architecture blogs are a gaga. […] » about 100 words Lens LustDigital Photography Review’s look of Sigma’s 50mm f/1.4 has me drooling. I have an el cheapo 50mm f/1.8 and am looking to upgrade. At $1500, Canon’s 50mm f/1.2 is just way too expensive, but their 50mm f/1.4 just didn’t seem to be enough of a upgrade to be worth the price. Sigma’s new lens, seems […] » about 300 words DerailedEu-Jin Ooi‘s picture of rail trucks piled up after a derailment isn’t nearly as scary as this derailment found at Dee’s Inbox: Can anybody name that incident? (The top one is BNSF, Barstow CA, April 2008. What’s the bottom one?) » about 100 words Piano ManLight-Paint Piano Player from Ryan Cashman on Vimeo. Mobile Safari Advanced FeaturesIf you’re already building web apps, you might wonder why you should bother to build an iPhone native app. The short answer is that you might not need to, but you should still optimize the app for iPhones. Native-looking chrome Set these in the head: // set a custom icon for when a user bookmarks […] » about 500 words iPhone Dev Camp NYCI’m at Apple’s iPhone Tech Talk in New York today. Info is flowing like water through a firehose, so I’m not going to attempt live blogging, but here are their suggested ingredients for a successful iPhone app: Delightful Innovative Designed Integrated Optimized Connected Localized The picture is of the main theater for the event. It’s […] » about 200 words Peephole DIY Fisheye LensFlickr blog I discovered the Peephole fish eye group. The idea is simple: us a $5 door peephole to give your camera a fisheye lens. Here are the instructions:
You can buy a pricier model with the Lomo label on it (and if you go looking, you’ll find a “peephole reverser” which is probably useless for your photography…probably). Henry Gordon Dietz offers a lot more info. Above is my first experiment with a peephole fisheye and my cheap video camera. I Am Talking To YouAfter stuffing yourself with too much Thanksgiving dinner and the tryptothan kicks in, there’s some time when all conversations seem to work like this one from Martin Wilson. A DC StoryOne sunny day in January, 2009 an old man approached the White House from across Pennsylvania Avenue, where he’d been sitting on a park bench. He spoke to the U.S. Marine standing guard and said, “I would like to go in and meet with President Bush.” The Marine looked at the man and said, “Sir, […] » about 300 words After The Thanksgiving Feast: Answer Who Owns The FishYou can only eat so much, and though we’ll likely stretch those limits tomorrow, at some point we all have to take a break. The good folks at Coudal Partners have the perfect solution: a simple test (available as a convenient PDF) that Einstein says only a handful of people can actually figure out. The […] » about 300 words Amazon’s Content Delivery Network Launches In BetaAmazon calls it CloudFront, and it costs $0.17 – $0.22 per GB at the lowest usage tiers. It seems that you simply put your files in an S3 container, make an API call to share them, then let your users enjoy the lower-latency, higher performance service. Their domestic locations include sites in Virginia, Texas, California, Florida, New Jersey, Washington, and Missouri. Internationally, they’ve got Amsterdam, Dublin, Frankfurt, London, Hong Kong, and Tokyo covered. Web Search Re-Imagined: Searchme iPhone AppRe-imagined a bit, anyway. Why browse a vertical list of results when you can flip through them like pages in a book (or album covers in iTunes). Searchme on the iPhone and iPod touch does just that. As you type your search term, icons representing rough categories appear, allowing you to target your search and […] » about 300 words Video DRM Hammering Legal ConsumersNobody but the studios seem happy about Apple’s implementation of HDCP on its recent laptops. The situation leaves people who legally purchased movies unable to play them on external displays (yeah, that means you can’t watch movies on the video projector you borrowed from the office). A related story may reveal the extent of the […] » about 300 words SCO vs. Novell Lawsuit Over, Linux SafeAccording to Groklaw, the long running battle between SCO and Novell may finally be over. The Judge ruled that SCO, the company that claimed Linux infringed on it’s IP and sued everybody in sight, never did own any rights to Unix in the first place, and has ordered the company to pay millions. Novell and others are unlikely to ever see much of that, though, as SCO is in bankruptcy. |