Interesting. Exactly one month since I last posted.
Using Hahlo4.1 With Prism
Since Jonnie Hallman is stopping development on DestroyTwitter (still my favourite twitter client ever), I thought I’d try out Hahlo. It appears to be a great Twitter client from what I’ve heard, and the developer is a fellow Australian!
As Hahlo is designed for phones (specifically the iPhone/iPod Touch), I figured it’s best to use it in Prism. Alas, two problems arose. Firstly, using oAuth opened the window in Firefox, and the window was the wrong size. I did a bit of digging, and found a way to fix this.
Open C:Users[user]AppDataRoamingWebAppsprism@prism.app
, and drop the code from this gist into there.
Merry christmas!
I spent most of yesterday writing a super-simple CMS. Now to finish writing the damned administration panel.
oEmbed
This is testing a couple of things, including oEmbed support in WP 2.9:
Plugin Options Page and Nonces
As any good plugin developer knows, WordPress 2.8 introduced a new way to handle the changing of options. The register_setting()
function is used in combination with options.php
to create an easy way to create option pages for plugin settings. This enables the plugin developer to focus on his plugin, rather than spending a great deal of time creating options pages.
Sounds great, right? Well, sure, until you introduce nonces (which you should).
For most developers, using the update-options
nonce, in combination with the page_options
POST variable, will suffice, and works fine with their current code. However, the code itself says “this is for back compat and will eventually be removed”. Being good developers, we want to keep up with the latest standards, and make sure our plugins work in future versions of WordPress. Our other option is to set the option_page
POST variable. This sounds fine, as we already have unique identifiers for our plugin functions (right?), so we can simply do <input type="hidden" name="option_page" value="rm_plugin_options" />
, right?
Wrong. Turns out, you need to do one extra step: whitelisting your options.
Whitelisting your options is what you usually do with page_options
, except, that POST variable isn’t used when we use option_page
. Instead, we need to whitelist the options in the HTML, via the whitelist_options
filter. I could explain the setup of whitelist_options
, but you can find that out by simply looking at the source of wp-admin/options.php
. Instead, here’s some example code. Enjoy.
function rm_whitelist_options($whitelist) { // option_page is the key here, values are option names to let through $whitelist['rm_plugin_options'] = array( 'pixopoint_themeoptions', ); return $whitelist; } add_filter( 'whitelist_options', 'rm_whitelist_options' );
So, finally done? Nope, still have one last thing to do: nonces! This is the most simple part. You must set it to [option_page]-options
for options.php
to accept it.
Finally, we have it done. Now, good luck with your plugin!
A New Blog. Again.
Well, looks like I’m starting a new blog. WordPress powered, again.
I’ll be testing a certain plugin here, codenamed Shot Glass. I’ll be revealing what it is at some time in the future, but for now, you’ll just have to see what the effects of it are… if you can find them. 😉