Unit testing plugins with different versions of WordPress

The nasty scenario: Your plugin depends on some WordPress functionality that doesn’t work as expected in another WP version. It’s possible to run unit tests under different versions of WordPress. Continue reading

Tagged , ,

Install several versions of WordPress

For plugin & theme development and testing, it can be useful to have different versions of WordPress available on your system. In this post, I’ll show how to achieve this on Windows. Continue reading

Tagged ,

PHP 5.2 and Interface Default Arguments: Fatal error

Something happened on the way to PHP heaven. A customer reported a fatal error where my unit tests caught none… Continue reading

Tagged ,

Publicize your WordPress.com posts publicly on Google+

If you see this on my Google Plus profile, that means I did it 🙂

After a long while of frustration of my WordPress.com blog only publicizing my posts on Google Plus “privately”, even though I had set up all the necessary permissions through the OpenID popup, I finally found the setting to make it public.

You must go to your Google Account settings, find the Apps page and click on Edit next to “WordPress”: change the permission where it says “Visible to”, and voilĂ !

Thanks to Jen T’s post for pointing me in the right direction. (The Google settings pages are a mess to navigate, anyway!)

Tagged ,

Run a PHP script on the background in Windows

Use this:

pclose( popen( 'start /b ' . $path_to_php_exe . ' -f ' . $script_filename . ' -- ' . $args, 'r' ) );

Now something important to note: any output from your script will prevent the above from working, including error messages. The PHP process will hang on the background and waits for you to fread() the output. Also double-check the quotes and escaping in your filenames and arguments!

Tagged ,

WordPress is GPL, must your plugin be as well?

Some people insist that since WordPress is released under the GNU Public Licence (GPL), its plugins must be also be licensed under the GPL since they are “derivative works”. I think this is not true, and represents a wish rather than a fact. In this post, I explain why you’re not required to release your WordPress plugin under the GPL if you don’t want to. Continue reading

Tagged ,

Automatically rename WordPress image uploads

WordPress out of the box isn’t very smart with image files. I wanted to automatically rename uploaded images to create pretty SEO filenames on my blog, but had to resort to creating my own plugin. Continue reading

Tagged , ,