Category Archives: WordPress

All about my love for WordPress. BTW, I am self-claimed WordPress Super star.

Bulk Delete can now move posts to trash instead of deleting

Bulk Delete can now move posts to trash instead of deleting

It’s been quite some time since I released updates to my WordPress Plugins since I was quite busy recently with lot of stuff (including the android course). Anyways I found some free time today and was able to push some updates to my Bulk Delete WordPress Plugin, which was overdue for quite some time. :)

Support for trash

WordPress 2.9 introduced the concept of trash, which allows you to move posts to trash (like Recycle bin in Windows or Trash in Mac) instead of deleting them directly.

I have added support for trash to my Bulk Delete WordPress Plugin. Now you can choose whether you want to delete the posts directly or just move them to trash. The credit for this feature goes to David Wren, you contributed code for this functionality.

Batch Deletes

I have also enabled another option which will be quite handy when you want to delete tons of posts. The most popular complain I hear from users of my Plugin is that, the PHP script times out if there were more than 1000 posts.

One possible solution is to increase the timeout period in php.ini file. But changing php.ini values is quite difficult especially if you were on a shared host.

I have now added support for batch deletes which allows you to delete the posts in batches. Say suppose you have to delete 5000 posts, you can now delete them in 5 batches with 1000 in each batch instead of trying to delete all the 5000 posts in a single go which usually results in script timeout. Hope this helps most of the users. :)

Screenshot

Below is the screenshot of the updated admin screen of the Plugin.

bulk-delete-wordpress-plugin

Support for translation

I have also generated the pot file for the Plugin and is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know. I will add it to the Plugin after giving credit to you.

Download

You can download the latest version of the Plugin from the Plugin’s home page.

Feedback

If you have any comments or if you want to report any bugs, please leave a comment below or contact me.

Stay updated

I would be posting updates about this Plugin in my blog and in Twitter. If you want to be informed when new version of this Plugin is released, then you can either subscribe to this blog’s RSS feed or follow me in Twitter.

Posted in WordPress | Tagged , , | 1 Comment

Bright Light, a free WordPress theme

Bright Light, a free WordPress theme

After promising a couple of times, I have finally found time to clean up the files and release the theme which I am using for my blog.

Right now I have uploaded the theme to my github page and you can find more information about using it from the theme’s homepage.

I have to clean up the files a bit more before I could upload them to the WordPress official theme directory. Till then you may have to download it from the theme’s homepage.

Features

The following are the some of the features of the theme

  • Two columns
  • Fluid width
  • Custom top navigation
  • Built-in support for social icons
  • Widgetized sidebar
  • Widgetized footer
  • Easy integration with couple of Plugins

Licence

The theme is released under GPL. Feel free to use or modify it as long as you can keep the link back to this page in the footer. If you cannot place the link (for instance on internal projects) and would still like to use the theme, then contact me and we can see what can be done.

Feedback

If you have any comments or if you want to report any bugs, please leave a comment below or contact me.

Posted in WordPress | Tagged , , , | 2 Comments

Using WordPress as a platform

Using WordPress as a platform

I just gave a talk in Bangalore PHP Meetup about ways in which we can use WordPress as a platform. The following is the slide I used and a little write up about the talk.

Okay, we have seen various tutorials, blog posts etc about using WordPress as this, WordPress as that and even a definite guide to using WordPress as a CMS ;)

What I am going to talk about is how we can use WordPress as a platform to develop PHP applications on top of it.

There are basically two ways in which we can write apps using WordPress.

  • As a Plugin or a Theme
  • As a standalone app

As a Plugin or a Theme

This is the most common way of writing apps using WordPress. You basically write a Plugin or a Theme that uses WordPress API. (This is how RoloPress is developed)

Check out the slide for some examples apps using this technique.

As a standalone app

In this technique, we can make use of our knowledge about WordPress functions and API in our non-standard WordPress PHP-based web applications. The easiest way to use this technique is to use BackPress.

BackPress

So what is BackPress. Here is the official definition

BackPress is a PHP library of core functionality for web applications. It grew out of the immensely popular WordPress project, and is also the core of the bbPress and GlotPress sister-projects.

Using BackPress, you can include the necessary files and you will get the WordPress utility functions. My most favourites are the security functions. In additions to using the utility functions, you will also be able to get the following features.

  • User role management
  • Complete Plugin API
  • XML-RPC Server and Client
  • Object Caching
  • Database Abstraction
  • Pseudo-cron functionality
  • Full HTTP library
  • KSES: Full security filtering for HTML content

You can see the full list in the BackPress documentation.

I also go about discussing the scenarios where it is advantages and where it is not so advantages to use BackPress. (You can see those in the slides)

So in a nutshell, if you are a WordPress developer and want to use the familiar WordPress functions in a non-WordPress PHP-based web application that you are developing, then you can use BackPress to get those familiar functions.

I am going to use BackPress in a couple of projects, which I am going to start and so stay tuned. :)

Posted in Events/Camps, RoloPress, WordPress | Tagged , , , , , | 7 Comments

WordPress MU merge has begun

WordPress MU merge has begun

Sometime back, I wrote about Matt’s announcement of merging WordPress and WordPress MU codebase together.

Now the wait is over, the actual merge process has started and this is going to be really exciting. :)

This will also mean that we will be able to run BuddyPress on single user WordPress installations, which is kind of cool. Eagerly waiting for WordPress 3.0 :)

Posted in WordPress | Tagged , , | 1 Comment

WordPress Plugin Development: Beginner’s guide – Review

WordPress Plugin Development: Beginner’s guide – Review

Sometime back, people from Packt Publishing contacted me asking whether I will be interested in reviewing their latest WordPress related book titled WordPress Plugin Development: Beginner’s guide by Vladimir Prelovac. Since the book suited my interests and also the topics which I write in this blog, I accepted, but got busy with RoloPress. Finally, I found some free time to read the book and here is my review. :)

Disclaimer: I just received a free copy of the ebook (in pdf format) for review. There was no condition that the review should be only positive and also I didn’t receive any payment for the review. So I am just writing what I felt about the book after reading it.packtpub-wordpress-plugins

About the author

As most of you would know the book’s author Vladimir Prelovac is a popular WordPress Plugin author who does WordPress development as a full time job. He is the “Been there, done that” kind of guy for anything related to WordPress (themes, Plugins, security etc.) and we can be sure that he knows what he is talking about (which is evident from the book).

About the book

The book consists of 8 chapters in which the author dissects and discusses about 6 of his Plugins explaining the code and concept behind them. The first chapter is a general introduction and in the eighth chapter he discusses about post-development activities for the Plugin like generating pot files, generating readme files, deploying etc.

Each Plugin (chapter) deals with different aspect of WordPress Plugin development like social bookmarking, using JavaScript and AJAX in Plugin, Widgets, shortcode API, custom templates, extending TinyMCE, custom post types etc.

Positives about the book

As Ozh says, this book is great for beginners who want to get their hands dirty and quickly learn the concepts behind WordPress Plugins. It can quickly put you on track and from where you can easily be on your own. (Even I wish I had something like this 4-5 years ago when I initially started with WordPress Plugin development)

In each chapter, the author gives a brief explanation about the Plugin and then gradually converts it into code. After each code listing he explains what the code does and how it does it, which would be very useful to grasp the fundamental concepts behind WordPress Plugin development.

Things which are not too good (for me)

The major thing which caught my attention was that, the book is slightly outdated in certain places. It doesn’t mean that the code in the book will not work, but what I mean is that there are certain new and better ways to do things. For instance, using old methods to parse RSS Feeds, having hardcoded paths to wp-content and wp-config.php file etc. Even some of the screenshots are pre 2.7

I wouldn’t blame the author or the publisher for it, because this is bound to happen to any technical book. But I would be really happy if there could be a v2.0 of the book with these changes. :)

The other thing which I didn’t like about the book is that most of the code samples doesn’t follow WordPress coding standard (especially camelcase function names). This is just a matter of personal preference but I would have loved if the author followed the recommended coding standards, since this book is meant for beginners.

Final Verdict

So my final verdict is that if you are a beginner or Intermediate WordPress Plugin developer then this book is a must have. It will easily get you on track.

Links

Posted in Books, WordPress | Tagged , , | 2 Comments

RoloPress – WordPress based contact manager

RoloPress – WordPress based contact manager

I have been dropping hints about a secret project which I have been working on for quite some time and now it’s time to reveal it.

RoloPress

The secret project was RoloPress, a WordPress based, open source contact manager, which I was developing with my friend Steve Bruner. The main distinction of RoloPress is that it is an application build on top of WordPress and is not a separate application with is tied up with WordPress.

Features

Some of the notable features of RoloPress for end users are:

  • All admin tasks can be performed from front-end itself. You don’t need to visit the admin area.
  • Ability to add/edit contacts
  • Ability to add/edit companies
  • Ability to add/edit notes about contacts or companies
  • Has lot of readymade widgets (around 8 in the initial release)

Developer features

RoloPress follows WordPress Plugin architecture and provides lot of features for developers to play around.

  • Highly extendable API
  • Lot of custom hooks and filters
  • Look and feel can be easily modified by creating child themes
  • Most of the existing WordPress Plugins will work out of the box
  • Easy to extend (If you know how to write a WordPress Plugin then you can easily write Plugins for RoloPress)

Release

The initial plan was to show the preview in WordCamp NYC (Now you know why I was interested in WordCamp NYC ;) ) and release it on 16-Nov-2009. But during the preview session, Matt (founder of WordPress) gave some interesting feedback and we are working on them now. Unfortunately these changes are not backward compatible and so we have held back the release till those changed are incorporated. So you have to wait for sometime ;)

For those who can’t wait, here is a presentation about RoloPress which was used in the preview session in WordCamp NYC.

Posted in Events/Camps, RoloPress, WordPress | Tagged , , , | 16 Comments

Plugin to display WordCamp NYC Badge

Plugin to display WordCamp NYC Badge

I guess, I am getting addicted to writing WordPress Plugins. :)

I was looking at the WordCamp New York Badge page and thought it would be nice to have a Plugin to display the badge, so after 30 minutes or so, WordCamp NYC Badge WordPress Plugin was born.

You can see it in action in my sidebar. :)

PS: If you are wondering why I am interested in WordCamp NYC, then do wait for another 3 weeks ;)

Posted in WordPress | Tagged , , , | 4 Comments

Log every email send through WordPress

Log every email send through WordPress

As promised, I have created a new Plugin called Email Log which will log every email that is being sent through WordPress. This Plugin will be very useful, while debugging issues related to email and will also let you to find out whether any spammer is abusing your WordPress installation. This Plugin is also MU compatible and can be used in WordPress MU installations also.

Features

Viewing logged emails

The logged emails will be stored in a separate table and can be viewed from the admin interface. While viewing the logs, the emails can be filtered or sorted based on the date, to address, subject etc.

Deleting logged emails

In the admin interface, all the logged emails can be delete in bulk or can also be selectively deleted based on date, to address, subject.

Cleaning up db on uninstall

As recommended by Ozh, the Plugin has uninstall hook which will clean up the database when the Plugin is uninstalled.

Screenshots

The following screenshot shows how the logged emails will be displayed

view-wordpress-email-logs

This screenshot shows how the email logs could be filtered or sorted.

wordpress-email-log-filter-options

This one shows how the email logs could be deleted.

wordpress-email-log-delete-options

Download

You can download the Plugin from the Plugin’s home page.

Feedback

As usual try out the Plugin and do let me know if you have any feedback, queries or comments.

Posted in WordPress | Tagged , , , | 1 Comment

Lessons from WordPress Plugin competition

Lessons from WordPress Plugin competition

As you may know already (and if you don’t, dude, follow me) I participated in the recent WordPress Plugin competition. The results are out and even though my Plugins were not selected, I received a much more valuable gift. Guess what, a detailed review of all my five Plugins by my favorite WordPress expert and a great inspiration Ozh.

The following are the lessons that I learned from the reviews

  • The details that you enter in the Plugin’s page like Plugin Description, screenshot, installation instructions, FAQ, example usage etc, but really help you to get more users for your Plugins
  • When you are using PHP 5+ only features, make sure that you have a fall back mechanism and correct warning to users.
  • When making calls to API’s it is better to use the built-in WP_Http class instead of CURL or sockets
  • Don’t hardcode the Plugin directory or file name, some users may change it, which might break your Plugin.
  • Similarly don’t hard code wp-content directory path. Some users might move their wp-content directory to a different path which might again break your Plugin.
  • If you need scripts or CSS, to be included, then include them only to the pages that need them and not to all pages.
  • If you are creating a table or storing too many options in db, then it is always better to provide an uninstall hook to clean this stuff when the Plugin is delete by the user.

I am guilty of most of them and I am in the process of modifying my Plugins to fix these issues and over a next couple of days you could see updates to most of my Plugins.

It’s always nice to get feedback for your work from someone whom you respect and in that way I am really very happy that I participated. Thanks Ozh for your time and feedback and WTC for sponsoring the competition and wishes for the winners.

Posted in WordPress | Tagged , , , | 7 Comments

WordPress MU and BuddyPress Plugin competition – 2009

WordPress MU and BuddyPress Plugin competition – 2009

Similar to the WordPress Plugin competition conducted by Weblogs Tools Collection, WPMU is coding a WordPress Plugin competition for WordPress MU and BuddyPress.

All you need to do is to create a (awesome) WordPress MU or BuddyPress Plugin and then release it. :)

Dates

The competition is open till Friday October 16th.

Prizes

There are some cool prices and the first prize winner will be get a cash award of $1000.

Rules

The rules are similar the WordPress Plugin competition and the main thing to remember is that your Plugin should be in GPL or GPL-compatible licence.

So it’s time to start another WordPress project. ;)

BTW guys, I am looking for ideas. So if you wanted a Plugin for WordPress MU or BuddyPress, then let me know and I might be able to create it for you. :)

Posted in WordPress | Tagged , , , , | 3 Comments