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:
```
WordPress Event Calendaring PluginsI actually use Event Calendar, which has been abandoned for some time. Looking at the alternatives listed in the Plugin Directory, Calendar, Events Calendar, and Gigs Calendar add full calendar management features to WordPress. While ICS Calendar, iCal Events, and Upcoming Events, simply offer the ability to display calendar data from elsewhere. What I liked about the old Event Calendar plugin is how events were posts. Creating an event started with creating a new post. Searching and browsing events was the same as for posts. I haven’t yet tried any of the alternatives, but if none of them treat events as posts, I may find myself re-working the old plugin for better compatibility with current WordPress. WordPress 2.6 Plugin and wp-config.php Path ChangesOzh’s tutorial explains the details, but the short story is that we’ll soon get WordPress Survey ToolsLorelle and Samir both point to a number of plugins to do surveys within WordPress, but neither of them say any of them are that good. And Samir is pretty disapointed: “at the end of it all, I never did find my ideal online survey tool.” Survey Fly is the best recommendation from both of Lorelle and Samir, but it isn’t WP2.5 compatible and was las updated in summer 2006. It’s also limited to tracking only one survey at a time. Ugh. bSuite 4 beta 2I announced the bSuite 4 public beta not long ago, now I’ve just posted a new version to SVN that addresses some of the bugs and fleshes out some of the features. I have yet to update the bSuite page, but here’s a preview of what’s new or changed:
About the new shortcode, use it like this:
One of *Why would you want to input tags, set categories, or add an excerpt to a Page? They help readers find and explore our content. What’s so wrong with that? bSuite 4 Public BetaI’ve had a lot of features on the table for bSuite for a while, but this recently discovered comment from John Pratt (whose Smorgasboard.net is a lot of fun), kicked me into gear to actually get working on it again. The result is bSuite 4, which is probably what bSuite 3 should have been all […] » about 400 words Interesting WordPress PluginsWP Contact Manager turns WordPress into a contact manager. It’s a combination of theme and plugins (including Custom Write Panel) that allows you to enter and manage contacts as blog posts (familiar, eh?). Use Members Only to secure access. TDO Mini Forms “allows you to add highly customisable forms to your website that allows non-registered users and/or subscribers (also configurable) to submit posts. The posts are kept in ”draft“ until an admin can publish them (also configurable).” bsuite_geocode Plugin For WordPressI’m a big fan of the WP Geo plugin, but I want more. My biggest complaint is that I want to insert coordinates using Google Maps or MultiMap URLs, rather than insert them in the modified story editor. So I wrote a bit of code that reads through the URLs in a post, finds the […] » about 400 words |