Well, I was looking through the coding standards on Word Press. There was something in there about usingwpdb for database calls. I figured; okay, this shouldn’t be too hard, just switch over the query calls to wpdb->query and everything will be fine. Whoa nelly!! Man, that wasn’t as simple as I thought. I had to take out all of my error handling. I guess that the wpdb class has enough error handling. But, methods I were using to determine if the values were empty and such just didn’t work. It took me a lot longer than I expected to get the database calls working again. Hopefully this is the hardest change to cleaning up my code.
One of the issue about the coding standards is using the braces {} in an if statement. The funny thing is, the standards tell you to read the Hackers mailing list to get information. When I went to the link, it was bascially and argument about whether or not to use the braces. Well, I will still use the braces, I think it makes it easier to read the code. I will clean it up so that the format is similar to Word Press style.
if ( (condition1) || (condition2) ) {
action1;
} elseif ( (condition3) && (condition4) ) {
action2;
} else {
defaultaction;
} // end blah
This will probably take me another couple of days to get around to. Then it will all about working on the style sheets. I think I am going to have a style sheet just for the WP People Popup. Trying to use the sytle provided through a theme is not going to work. However, since it will use a style sheet, the user can easily adjust that css file.
The last thing I am going to do is go through and globalize/internationalize/localize the plugin. I’ve never done that before, so this will be new territory. I don’t have a lot of places to fix, so once I figure out how it works, then it shouldn’t take long at all.
About DeanLogic
Dean has been playing around with programming ever since his family got an IBM PC back in the early 80's. Things have changed since BASICA and Dean has dabbled in HTML, JavaScript, Action Script, Flex, Flash, PHP, C#, C++, J2ME and SQL. On this site Dean likes to share his adventures in coding. And since programming isn't enough of a time killer, Dean has also picked up the hobby of short film creation.