Week 5 status report

Whats been acomplished this week.


  • Started working on “wp-Update-Manager”, a manager for Plugin authors who want to host the Update system themselves.
  • Changed the method that Requirements are checked in wp-Update, also a few small display changes


  • Continued working on wp-Update-Manager, Sorting out weird JS Bugs.(more on this later)


  • Wp-Update-Manager: Can return a Serialised array containing update information for any defined plugin.
  • Wp-update: Handles the update text logic better now
  • Wp-update: retrieving update information from custom defined source works OK (Plugin URI: http://…./)


  • Wp-Update: Fixed a bug with the comparison of Versions
  • Wp-Update-Manager: Slugs not name in url.
  • Wp-Update-Manager: Added a table of Update URI’s.
  • Wp-Update: Major Fix: When running with “short tags = On” you would be greeted with a nice Fatal Error Syntax notice.. oops, all my dev. machines have it turned OFF (And so should you!)


  • Wp-Update-Manager: Fixed a few JS bugs
  • Wp-Update: Added more comments, reviewed the function layout.
  • Wp-Update: Added support for checking if a PHP Extension is available, Implemented a stupid search for version functions from that extension to determine if compatible.
  • Wp-Update: Started some work on the Plugin search UI.
  • Started the ball rolling with getting a data access method into wordpress.org

Plans for Next Week

Hopefully finalise the API, Get some API/hooks into the plugin to allow extra manipulation by other plugins and what not.

Continue with the Documenting of code (PHP Doc commenting), possibly start work on plugin install proceedures(Should use most of the Theme installation code, so shouldnt be that hard).

Investigate bbPress a bit more, I had someone enquire about the possibility of adapting my plugin to work with bbPress, From what i can see it’ll require writing another front end for it, but other than that, it should be possible to re-use all the back end code if i continue into that. Of course at a latter time i’ll be wanting to test with WordPressMU as well.. i’m not sure if theres any major differences that would need to be taken into consideration there.

Problems Encountered so far (And useful resources)

  1. The JQuery tabs plugin cant handle tabs being dynamically added.. Wrote my own version for another plugin i’m working on, Copied it intowp-update
  2. Realised the Tabs JQuery plugin i wrote cant handle multiple tab sections on a page, Added a namespace holder to each tab group.. Started looking ugly at that stage.
  3. Attempted to work out how to create a custom permalink; Custom Queries (Codex) came in useful there..
  4. Ran into a bug with register_activation_hook(), traced it back to plugin_basename() not working on Windows Systems, Turns out its a 11 Month old bug(#3002), Apply the changes from another ticket #4408 and submited a diff back to #3002
  5. More JS Bugs; Remember, Do not create multiple divs with the same ID… JQuery doesnt like it.
  6. Need to work out how to encue jQuery for a single subpage rather than globally into every option page. (check $pagenow, and then check $_GET[‘page’])
  7. Locating the function to create a slug, For future reference, its sanitize_title_with_dashes() no mention of “nicename” or “slug” to be found :)
  8. Completely unrelated to this report, But, Whats the go with TinyMCE breaking out into non-breaking spaces randomly? dont like having to copy-paste to word, do a find replace, and then copy back to code view..

Note: Week 4’s status report was Null and inserted at the end of Week 3’s.

Week 3 status report

Whats been acomplished this week.

Wed:More Filesystem code was written; Specifically find_base_dir() for the FTP class, It should allow the class to find the installation directory on _most_ setups..

Thu: Using the file_base_dir() ftp function i can now install themes via FTP(Using exact same code for both Direct and FTP access), Can also provide a custom base dir in the options panel.

What i’d like to accomplish next week

Complete my Exams :)

As for on the GSoC project, i’ll start to complete what’s been sitting there for the past 2 weeks needing to be done..

EDIT: Week 4: Nothing was done, Exams took priority. Week 5 is now starting, and i’m back up and running.

Week 2 status report

Only a small update this week. Most of this week has either been spent revising for my exams or waiting for the computer to finish drive images (My main hard drive decided to fail, spent 2-3 days either backing up, or letting it attempt drive images, nothing could image the drive though), not to mention trying to get apache and php playing nice again after the re-install

Whats been acomplished this week.

Not too much, Some FTP Filesystem was written and tested,  Some more theme installation stuff was added in, it should now accept a better range of archive layouts(the folders within the archive, it still only accepts .zip files)

Hopefully i’ll manage some time on the weekend to write some more code,  Or at least a chance to think about how to perform theme/plugin upgrades..

What i’d like to accomplish next week

to Start the plugin installation code, or improve the theme install code more,  I’m mainly focusing on theme installation at present and then planning on porting most of the code over  to the plugin installation routine, It’ll be very similar in the end.

I’d also like to clean up the logic for determing what to display for the update status, at present its code duplicated in both plugins.php and ..-ajax.php. I also need to start documenting the arrays used within the class and add PHPDoc comments to functions.

In addition, The stuff i didnt get done this last week gets shunted into next weeks time slots too:
re-code older stuff if need be,  add nonces to options panel, continue on the filesystme code.

Events of late

Well winters setting in, Its bloody cold to say the least in this house.. Next wednesday (13th) i have by first exam, followed by another 2 on the 20th and 21st, which’ll mark the end of semester for me finally :)

Hopefully i’ll have more news and work on the plugin done by then too.

Oh and also, Is there anyone out there currently using/testing the plugin? I’d appreciate comments from anyone who is testing it as i go,  I try to keep my svn as stable as possible, but not all code paths are used when i’m testing, and its too much of a pain to FTP my code onto my webhost/linux machine all the time to test..

Week 1 status report

The Summer of Code is now underway, infact, last week was Week 1. I’ve been working on my project for the past ~2 months in some spare time, So up until now i’ve had very little peer review of the code, testing, and real log of what i’ve done (except for the SVN commit comments).

Instead of talking about what i’ve done in the past week (Which honestly, is absolutely nothing — Uni assessments come first!), I’m using this initial Blog entry as a overview of the past 2 months of development i’ve done.

What has been accomplished so far.

Lets see now..

  1. Plugin Update Checking: Although this is so far not very advanced, it still works amazingly well.
  2. Theme Searching: Yep, You can now search for themes directly from within the WordPress Administration panel.
  3. Theme Installation: It works.. However definitely needs some more work done on it.

The Plugin update checking currently relies on a 3 step method..

Step 1: Check plugin file for a “Update URI:” meta-item, If it is set, then thats the URL where the plugin information is pulled from.
Step 2: Do a search on wordpress.org/extend/plugins/ for a Plugin matching the same name as the Plugin being checked, If ones found, the plugin information is taken directly from the wordpress.org page for the plugin.
Step 3: Pull all the information from the URL specified and make decisions based on whats provided, If theres a newer version available, then display it to the user. At the same time, the plugin also checks the requirements of the plugin if they’re supported, Eg. “Plugin only tested up to WordPress 2.1”

Theme searching is pretty standard, the interface is very similar to themes.wordpress.net, infact at present borrows some code from that very page.

Theme Installation is pretty basic as well, This was only put together in a few hours week before last while hiding away from Uni Assessments. I’m writing up some wrapper classes around the Filesystem functions and FTP functions which i’m calling WP_Filesystem, What i aim to do with this is allow a single API for the plugin to use(And potentially others) which can modify/access files either directly via the filesystem, or by FTP(php_ftp ext; php sockets; php streams; etc). At Present i’ve got a basic model for Direct Filesystem modification working, which will most likely be fleshed out a bit once more work is put into it as well. theres some basic PHP_Ftp Extension class work in some messy code too from a previous project.

What are your plans for the upcoming week.

heh, This part reminds me of a Simpsons quote… “Krusty: *reading from auto-queue* Now its time for my favourite part of the show! *groan* Speaking to the audience!” ok, chances are, that quote is probably right off track.. but simpsons fans will probably know the scene i’m refering to :)

Items that i’d like to work on this week include improving the security of the plugin (i’m mainly thinking of nonces..) and working on WP_Filesystem a bit more, however due to the way i’ve tended to code, i’ll most likely also improve the Theme Installation and re-code some of my older code which no longer makes sense.

Problems/Chalenges so far

The first thing that comes to mind is the lack of a data-interface to the wordpress.org/extend/plugin and theme.wordpress.net setups, Now some people might suggest that this should’ve been the first thing that i looked at getting done, however i have so far been putting it off for one simple reason: I dont want to mark any access methods in stone before i’m fully sure of the data i’m going to want in the plugin. But i’ve been thinking about this as well for the past month, theres several possible methods, RSS feed, XML File, PHP Serialised Array, Plain text, etc, Personally i’m leaning towards a PHP Serialised Array, quite possibly simply because of the effort involved in parsing the XML File compared to it, And that i honestly dont know much about a RSS feed layout and how WordPress’s include RSS parser would handle multiple fields in it.. Thats something i’ll have to look into in time.

The next item that comes to mind is the lack of documentation available for certain things, Or quite possibly, The lack of knowldge on my part to know how to find what i want. namely the i8n functions, _e() and __(), How do you use them correctly? AFAIK best practive is to wrap all text blocks in a _e() call, But what else do i do with it exactly? What about when i want to put a few variables into the string, do i use sprintf(), do i concat things with __().. etc.

On that note.. the WordPress Object Cache was another hurdle that i hit, For some reason cache objects were exireing before my custom cache timeout value.Turns out, the custom expiration value is completely ignored at present. I created a patch for this using the modification time of the file created.. As of yet, there hasnt been much interest in it, It needs an updated patch to be uploaded to keep it in line with the current SVN though.

Back to the Plugin update notifications, One problem i’ve found there is that the plugin name thats shown within WordPress isnt necesarily the same name that the Plugin exists within the wordpress.org world, This is causing some anoyances with the current method of searching for plugins.. as it means not all plugins can be found, which subsequently means some plugins may have updates available which i cant find automatically. I think the best way will be for all Plugins to include a link to the update location, either be that a WordPress.org slug, or URI to its update location.

Well, this post has become more of a essay rather than a short update, but i guess thats what you get for having 2 months worth of status sitting in your mind. Hopefully future posts will be much shorter.

For all those who want to check out some screen shots of the current work, Have a look at my previous blog entry on the topic: http://dd32.id.au/2007/04/17/google-summer-of-code-wp-update/ If anyone would like to look at the source code at present, you can do a SVN Checkout on my current dev. build here: http://wordpress-soc-2007.googlecode.com/svn/trunk/dd32.crazyman/trunk/