When reworking the theme for this blog, I decided I wanted to add the Twitter-style quick post box from the Prologue theme to my theme. Instead of adding it directly to my theme though, I decided to try to write it as a plugin. Lo and behold, I succeeded:

A screenshot of the Posthaste plugin on this blog

I don’t know why—it’s not that much work to use the WP admin backend—but this seems to make blogging seem much more inviting to me. I basically just took the relevant code from the Prologue theme, modified it a bit (adding a “Title:” field, for example) and found the correct WP hooks to put it in Plugin form.

I’m actually thinking about releasing it as a real plugin. When I mentioned this to my friend James, he recommended the name “Posthaste.” James is much better at naming things than me, so I took his recommendation.

If this sounds interesting to you, you can download it and try it out. If it seems useful to other people & actually works well enough, I may submit it to the WP plugin directory. I tested it with a handful of the most popular themes on the WordPress Theme Directory and it seemed to work with them all.

A few notes:

  • If you leave the “Title:” field blank, it takes the first 40 characters of the post content & makes that the title.
  • It posts to your default category…unless
  • If you have a category named ‘asides’, it will put posts with empty titles in the ‘asides’ category. You can then style them as asides, which is what I do on this blog.
  • If you want to change any of this behavior, there’s no options page or anything: you’ve got to edit the php file.
  • It only has the most basic CSS applied. To customize it, you can add custom CSS to the ‘styles/local.css‘ file.
  • Your theme needs to use wp_head() for it to work. If you’re using a new theme at all, it probably does.
  • There’s an ongoing problem with Prologue in WP 2.6. I fixed it, I think, by changing the auth_redirect() code. If you know more than me about these matters, and my “fixing it” this way was a bad idea, please let me know. (This was supposedly fixed in Prologue 1.4.1, but I’m still having the same problem.)