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 …

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.
define ( 'ALLOW_UNFILTERED_UPLOADS', true);

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 …