Categories
WordPress

Strip Extra ImageScaler Attribute from Plugin-Generated Code

I am using the ImageScaler plugin for WordPress on a project, and I like what it does, but it adds a non-standards-compliant attribute to images, such as: <img class=”” src=”http://www.example.com/imagescaler/generated-image.jpg” alt=”Example” width=”258″ height=”234″ imagescaler=”http://www.example.com/imagescaler/original-image.jpg” /> To strip imagescaler’s imagescaler attribute, add the following into your functions.php file: add_filter(‘the_content’, ‘strip_imagescaler’); function strip_imagescaler($content) { $content = preg_replace(‘/imagescaler=”(.*?)”.?/s’,”, […]

Categories
Code WordPress

Get medium image size in WordPress

This is for everyone who’s been trying to find out how to get the medium image size of a post attachment in WordPress: You’ve got to send the function the ID you’re trying to get the medium images for. $medium = wp_get_attachment_image_src($picture->ID, ‘medium’, false); $med_url = $medium[0]; $med_width = $medium[1]; $med_height = $medium[2]; There are […]

Categories
Blogging

WordPress.com finally updates to 2.5 — A review

A picture [of my cat] is worth a thousand words. I’ve been waiting for WordPress.com to update the administration panel so that I can have galleries.  That is the main feature that I’ve been waiting for.  Now it’s here, I can finally upload pictures of my cat (and my wife 🙂 )   This will […]