Comment Form Hooks Visualized

Most themes (e.g. TwentyTen) use the comment_form() function to insert the comment form after posts. There are quite some hooks inside the function but they are hard to localize. The codex documentation isn't too helpful, neither.
To give you an easy overview the following diagrams visualize the points where the various hooks are anchored. The number of available hooks depend on the discussion settings and the user's capabilities.

In the most common scenario the user is not logged in, is allowed to comment on the article and the comments are not closed:

There are six hooks available:

  • comment_form_before
  • comment_form_top
  • comment_form_before_fields
  • comment_form_after_fields
  • comment_form
  • comment_form_after

You might have noticed that the hooks comment_form and comment_form_after seem to be anchored almost at the same point but depending on the user's role and discussion settings they are not always available so you should take care which hook you are using in your code.

User logged in
If you are logged in you have fewer hooks available since the name, email and URL input fields are not needed. The missing hooks are

  • form_comment_before_fields
  • form_comment_after fields

User is not logged and "Users must be registered and logged in to comment" activated
If your blog is configured that only registered users can comment, an unregistered user will see this comment form and additionally the hook comment_form_must_log_in_after is available. Please notice that in this case the hook comment_form is left out.

Comments closed
If the comments on the post are closed you have only one hook left (comment_form_closed) since the form is not displayed at all:

WordPress Framework with Intuitive Backup Functionality for Better Local Development and Option-Router!

Xtreme One BackupA new version of Xtreme One, the WordPress Framework, was released last week. It includes two major new features. With the new developed Option-Router it's possible that the Childthemes manage their own settings, layouts and additional all used Widgets with all their content. That means, you can switch between the Childthemes and have the specified settings for each Childtheme, without adjusting the Childthemes again after switching.

The second highlight is the new Xtreme Backup. Xtreme Backup enables you to save the complete configuration of your Childtheme and your Widgets as a XML file on your computer. Therefore you can develop local or on another server, create backups and use them right away on your live system. A matter of seconds!

These two new features, optional HTML5 output and infinitely different layouts and the userfriendly backend makes Xtreme One become the most innovative WordPress Framework. Xtreme One costs only $79,95 and can be purchased here.

A great alternative for any WordPress website no matter which theme you are using is our BackWPup

php-Console with Chrome and WordPress

Google Browser Chrome and their Chromium project are becoming more popular. Initially it was the speed of Chrome, which made it so popular but now also the extensions are getting in the focus of the users. Nowadays the extension market of Chrome is full of very useful extensions. Of course there are also many enhancements in the context of web development that have helped Firefox to fame.

In the field of PHP development, I've always looked at several solutions, played with different options and in the end I'm sitting in front of a browser with IDE, XDebug or some of my own extensions. In Firefox I have used FirePHP in various areas, more information about it can be found in this article. Alternatively I also wrote about the debugConsole. Therefore it was natural to browse for a solution in the environment of Chromium. You will be able to find some interesting topics about it and I would like to introduce php-console and show how to integrate it in WordPress via Plugin.
Continue reading …

WPEngineer Mentioned in WordPress Plugin Development Book

We just want to say thank you to Ozh, Justin Tadlock and Brad Williams, that they mentioned our website in their new book Professional WordPress Plugin Development. We are just one of a few recommendations in this book and we really appreciate that. We didn't read the book yet, but we are pretty sure that the content is excellent and has some really neat tips to write your own Plugins. You can check it out here.

FYI we don't use an affiliate link, so we are not biased. It's just a way to say thank you!