Add WordPress Dashboard Widgets

Finally WordPress 2.7 is coming along with widgets in the dashboard area, so it will be possible to adjust your dashboard as you like.

For Plugin or theme authors it's even more interesting, since they can give the users additional value to their Plugins. They can offer information from their Plugin directly on the dashboard. The user can decide if he likes to display them or not.

It's easy to integrate and can be controlled like Meta Boxes (explained in detail). The following example shows how you can integrate a widget in a dashboard.
Continue reading …

Secure Include Plugin In WordPress

Some people use more and other less Plugins in WordPress. but it is allways advisable to check via code if a Plugin is active or not. That makes sure the theme wouldn't break if the Plugin is not active. It's pretty easy to include a little bit code to check for inactivity. I show you an example where I use it in my Plugin RSSImport.

<?php if ( function_exists('FUNCTIONSNAME') ) : ?>
...
<?php endif; ?>

Example for Plugin RSSImport:
This is how the function looks like in the code of the Plugin RSSImport.

...
function RSSImport($display=0, $feedurl, $displaydescriptions=false, $truncatetitle=true) {

if ( $feedurl ) {
...
<?php if ( function_exists('RSSImport') ) : ?>
<?php RSSImport(10, "http://feeds.feedburner.com/WpEngineer", false, false); ?>
<?php endif; ?>

or a little bid smaller

<?php if ( function_exists('RSSImport') )
RSSImport(10, "http://feeds.feedburner.com/WpEngineer", false, false); ?>

WPlize – A Class For Options In WordPress

So what is WPlize and what is it for?

WPlize is a class, which access the options table of WordPress and makes it easier to create, edit, get and delete preferences of a Plugin or theme in the options table of WordPress. Using this class improves the performances and create a clean code in Plugins and themes. Only one entry will be created for each Plugin or theme, an array creates and manages the entries.
Continue reading …