hooks

You are currently browsing articles tagged hooks.

Ever since I first released Tarski, people have asked “How do I do x?” Ever since I first added the hooks API to Tarski, my answer has often been “With a plugin.” However, there’s usually a follow-up request: “I don’t know how to do this; can you show me?”

It’s usually less work to write the code myself than to try to explain all the background knowledge someone will need to do it themselves, so I’ve ended up writing an awful lot of example plugins. For a while now I’ve wanted to list them somewhere on the site, so they’re easier to link to and keep updated, and today I finally got round to it.

You can see all my example plugins here.

Hopefully they’ll be of some use, both directly to users, and indirectly as a way to learn how to write simple WordPress plugins and interface with the Tarski API. I’ve separated them out into plugins that work with and require Tarski, and those that just use the normal WordPress API.

I’ve also published the plugin I use to customise the Tarski website, which may be of academic interest.

Tags: , , ,

I’ve finally got round to updating the Tarski hooks reference, so that piece of documentation is now up to date for Tarski 2.4.

The entire process is now automated, pulling the documentation straight from the inline documentation in the Tarski source code, so further updates to the hooks reference will happen entirely silently as new releases of Tarski come out.

If you’re interested in the code I use to do this, it’s available on GitHub.

Tags: ,

Tarski 2.1 includes a number of enhancements, including a fully widget-based footer area, avatar support, and a reworked options page in line with the new WordPress admin interface. Details are in the changelog as always.

Upgrade guide

  1. Back up any custom stylesheets, sidebars etc.
  2. Switch to the default theme
  3. Update your Tarski files
  4. Put your custom files back
  5. Switch back to Tarski

Changing themes ensures that Tarski isn’t running while you update your files, and triggers the upgrade routine (visiting the Tarski options page is another way to do this, if you’re just running svn up for example).

Recently I’ve been contributing the odd patch to the WordPress core, and coupled with the many other huge improvements in WordPress 2.5, the result has been that I’ve been able to remove a few things from Tarski. The ability to choose which feed type is linked to by default, for example, has been added to WordPress, and so it’s been dropped from Tarski.

Widgets

I also decided to finally give in to the inevitable, and drop Tarski’s native sidebar implementation in favour of the widgets it’s had since version 1.1.2. If you’re using the Tarski sidebar, don’t worry: your settings will be automatically converted into widgets. If you’re using a custom sidebar file, that will be picked up too: if it’s there it’ll be used, overriding the widget sidebar, and if it isn’t, it won’t.

The main footer area is now a widget field, too, and Tarski’s recent articles code has been rewritten as a widget, so you can either keep things as they are, or start customising madly. Tarski’s hooks system has received a number of additions, so anyone building their website on top of Tarski should find it that much easier to make adjustments. Some 2.1 developer notes will be forthcoming once I find the time to finish writing them up.

Avatars & icons

After being absent for a few versions, avatars are now back, courtesy of the native WordPress implementation in 2.5. You’ll be able to see them in action by commenting on this post.

I’ve also taken the opportunity to freshen up the theme with some new icons. Obviously if you want to use them in any other GPL-compatible project then you’re free to do so.

Options page

Obviously the biggest change in WordPress 2.5 is the new admin interface, and Tarski’s options page has received a thorough overhaul too. The last time we made such a big change was in version 1.3—almost a year ago. Things have come on a fair bit since then. Enjoy the new version.

Bugs and suggestions on the forum please.

Tags: , , , , ,