WordPress Database Functions

The WordPress database class is quite extensive and provides a range of methods to work effectively with the database and thereby use the WordPress standard.

You can find the class in /wp-includes/wp-db.php where the individual methods are documented.
I show the most important ones and give some small examples. It is important to work with these opportunities to ensure the safety of Plugins.

Continue reading …

Set options on activation Themes

The Photo Blog Theme Greyfoto has been updated and I wanted to make sure that the settings of WordPress are as I need them for the theme. Therefore must be written some data in the database when activate. Currently there is no hook for this, as is known for Plugins. The discussion on WP-Hacker-List was just right on time, and possibly Theme Developers get these hooks, similar to Plugins in WordPress 2.9.

If you want to use the activation of the theme in order to set various settings, then the following snippet can be very useful, which came up in the discussion on the WP-Hacker-List. This works like a charm and should be useful for theme developers who want to enable the options upon activation.
Continue reading …

Add File Types for Mediathek

In WordPress 2.8.5 the whitelist of allowed MIME types for downloads will be valid for administrators the first time. This is a step towards security and you can, with the help of a constant, upload all data types.

Who has implemented several projects already with WordPress probably had experienced that a user doesn't have the rights to upload a specific format.

The Plugin Role Manager allows the uploading of all MIME types. But in my opinion this is not the perfect way, and therefore here is a small code snippet that takes adjusting according to the particular requirement.
Continue reading …

New Feature for WordPress 2.9 – WordPress Image Editor


We already wrote about some new features, such as new filter and the Trash-function in WordPress. It has long been known that WordPress 2.9 will add some features for image editing - the users want these features, right in the core and not as a Plugin. You can get a first insight into the current development version. Since not everybody is working with it, here are some screenshots of the editor for images. The screenshots certainly speak for themselves: