WTF?
This is an experiment on Usability by Anirudh Sanjeev. Under construction. Run along now.
This is an experiment on Usability by Anirudh Sanjeev. Under construction. Run along now.
February 9th, 2008 Leave a comment posted in Uncategorized
It’s a framework to allow your plugins and themes to update themselves to the latest versions, so the users are never using the old version. It is just a port from the source code of the OneClick plugin, which featured the ability to instantly upgrade itself.
Here are the steps you need to take to use the OneClick Framework:
Essentially you’re creating a new object, and setting the file where it has to look for the latest version, and the path from which it has to download the zip file.
It works by unzipping the contents of the remote zip file in the parent directory. so it will unzip the contents of myplugin in /wp-content/plugins/, thus effectively replacing the old version of the folder.
If you have any question, leave a comment here and I’ll try getting back to you. In case you find a bug, have a feature suggestion, or want to help out with the code, send an email to anirudh at anirudhsanjeev dot org
I am Anirudh. I also happened to write the OneClick plugin for wordpress. This has been downloaded over 12000 times. This website is part of my new project, where I write articles on usability and interface design. It’s still under construction, as you can see.
Important:
I just found a minor bug that could’ve deleted your wp-admin folder(not a good thing). Now what you have to do is just add one more line to your code before checking for an update.
If you’re using it for a plugin, then add $updater->targetdir=”../wp-content/plugins/”; near the other environment variables
If you’re using it for a theme, then add $updater->targetdir=”../wp-content/themes/”; near the other environment variables
Download the file: ocframework.zip (version 0.1)
October 4th, 2007 9 comments posted in Uncategorized
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
September 4th, 2007 1 comment posted in Uncategorized