How To Make Your Own WordPress Widget

In this article, I’m going to show you how to write a simple plugin that adds a new widget to WordPress. We’ll be using the new WP_Widget class, which is the newest method but means that the widget will only work in WordPress 2.8+. I know that 2.8 isn’t actually out yet, but it will be soon and there’s no sense in learning the old method.

The widget we’ll be creating will display upcoming posts (scheduled posts). A lot of sites schedule posts to automatically publish at a specific time, helping them keep a steady flow of articles. I know that I use this trick on Web Developer News and Attackr, and I’ll use it on this site as soon as I get some more articles written. Since the articles are already there and ready to be posted, why not tease them and give your readers something to look forward to? That’s exactly what this widget will do.

Read more

News About WordPress 2.9

There was a meeting in IRC for WordPress developers yesterday. A release date for WordPress 2.8 was chosen, and they made some great decisions regarding WordPress 2.9 as well. Here’s a quick summary of the things I found important.

For WordPress 2.9, they’ve decided to raise the version of MySQL supported from 4.0 to 4.1.2! That may not seem like much to those of us out there using the latest versions of everything, since version 5.1 is out, 5.4 is in beta, and even 6.0 is under development (and because 4.1.2 was released in May of 2004). However, the big thing that sticks out to me is that 4.1 support subqueries and unicode. Unicode should help for people that are using WordPress in non-English languages, and subqueries should help to greatly simplify queries. Also in 4.1 MySQL added support for the ‘INSERT … ON DUPLICATE KEY UPDATE’ syntax which will insert a new row unless that would cause a duplicate primary or unique key, in which case it updates the existing row.

Read more

WordPress 2.8 Release Date

I’ll keep this short. There was a meeting in IRC for WordPress developers yesterday. The quick summary is that you can expect the release of 2.8 on June 10th, 2009. However, while that’s what so many people are asking, that wasn’t the exciting part! Stay tuned for news about WordPress 2.9.

WordPress and the Google Summer of Code

For those that don’t know, Google has been doing something called the Summer of Code since 2005. Google picks open source projects to fund development for. Then they accept applications from college students and then choose about 1000 winners in conjunction with the project mentors. Project mentors are experienced developers that are familiar with the project in question. Each student is paired with a mentor, who will help by giving direction and advise throughout the process. Google pays the students $4,500 each to complete their project over the summer, as part of their contribution to the open source community. The main requirements are that you have to be 18 years old or older and enrolled as a full or part time student as of April 20, 2009.

The process goes something like this. On May 23rd the students begin coding, and receive their first payment of $500. On July 13th they have “Mid Term Evaluations” where the mentor evaluates the student, and the student evaluates both the mentor and the project. At this point, if the student isn’t performing, they will be dismissed, but the vast majority of students will continue and receive their second payment of $2000. On August 17th the students stop coding. On August 26th there is a final evaluation which works just like the mid term evaluations worked. The student now receives their final $2000. On September 3rd, the code must be submitted to Google.

Read more