WordPress is developing fast - this also applies to the design of the backend. So it is important not to use your own styles in the admin area and use tags and classes of WordPress. This is the best way you can simplify your work as a developer and you don't have to test the design with every update. Unfortunately, there are quite extensive opportunities in the backend to implement the requirements. Several different classes and HTML structures are used. To be able to look up something this simple, I have developed a small Plugin, which tinkers in the development environment and quickly represents the necessary elements. Here you see two screenshots with the differences between version 3.1 and 3.2 of WordPress and the current contained elements of the Plugin.Continue reading …

WordPress offers for normal Plugins the hook register_activation_hook();. This is active right after the activation of a Plugin, so you can start small installation scripts. But if we are in a MultiSite environment (old: MultiUser) and put the Plugin in the folder wp-content/mu-plugins, then the hook doesn't do anything, because the Plugin is automatically activated. But there are few ways you can still have a kind of activation hook. One is this option:

We are doing the following: We check whether a certain option is set in blog 1, if not, then run through an activation function, otherwise do nothing - Blog 1 simple so that the install script is only in blog 1 in use. If you want to use it in all the blogs then simply use the function get_option(). Easy, right?

Guest Post

This post is written by Thomas Herzog - hughwillfayle.de and is a guest post on WP Engineer about WordPress.
Thank you very much from my part to Thomas. Please see his nice plugins on the official WordPress repository.
If you also like to have your interesting post published on our website, please let us know on our contact page. Of course we will appreciate your contribution!

Creating Plugins and Theme functions with multilanguage capability has been established knowadays.Especially for us as German developers it is a must have. But there are some difficulties if you are using JavaScript, the question is how to provide it multilingual or provide option values in different languages. WordPress offers some possibilities and I like to show them, since this question was asked by many and developers are searching for solutions. The following little example should show the realization and the easy output of strings demonstrates it. Wether strings for multilanguage or providing options values, it doesn't matter.Continue reading …

Most comment forms contain the same input fields: Name, Email, URL and the comment text field. This is sufficient for most use cases but there are situations where you might want to know a bit more about your commenter: their age, the city they live in, or the color of their underwear. This article explains how to add an input field, store the data in the database and how to display the additional data in your blog if your theme uses the comment_form() function provided by WordPress. Continue reading …