DUI is a design blog filled with articles and information. Despite the name, this is not your local AA.
This post contains no responses. Skip to them now.
There are a couple issues with Wordpress 2.6 that I am not very found of. First and foremost there is the additional code added when you insert images into the post. A class is added, along with the height and width of the image. All of this is not needed, and all a designer, you probably want complete control over how your images are displaying - which can make it a pain in the ass to have to edit image code over and over again every time you add them into posts.
Removing all that additional Wordpress image code takes only a few seconds. Navigate to your …/wp-includes/ folder and open the file called media.php. On line 118 you’ll find the line below. By simply removing the $hwstring as well as the class, your upload image code will be condensed and easier for you to have complete control over.
$html = '
';
Change the above line to look like this:
$html = '
';
Alternatively you could style your images right there and assign them with a single class to be applied to all uploaded and inserted images:
$html = '
';
Your image code will now look something like this

As opposed to…

Wordpress
This one has been covered multiple times since the issue was discovered a couple weeks ago. In Wordpress 2.6, one of the much-bragged about new features is post revisions. That’s wonderful if you’re running a multi-author blog, but if you’re not, it’s not so pleasant. Your post is saved over and over again, filling your database up with extra entries that it does not need - especially if you already have a large blog.
Turning this off is even easier than removing the garbage from the image code. All you need to do is navigate to your wp-config.php found the root of your Wordpress install. Now, add the following line anywhere in the file and save it. For those looking to save even more time you can grab a no revisions plugin which will disable revisions for you. There is also a plugin out there that will clear your existing post revisions from the database.
define('WP_POST_REVISIONS', false);
These are just two simple things which may improve your usage of Wordpress if you have yet to make these hacks.
© Copyright 2010 DUI. / Subscribe to the rss feed.
Home plate, basecamp, the root, whatever.
A little bit about DUI and what it is.
The DUI content archives. Good stuff here.
Free items you can grab without going to jail.

Join the other subscribers now.
Get in touch with the man behind DUI.
Content Navigation: