WordPress.org

Ready to get started?Download WordPress

Forums

Compatibility testing question (2 posts)

  1. mobilesentience
    Member
    Posted 3 years ago #

    Just a quick query for the other plugin developers out there. I'm trying to make my advertising management plugin as accessible as possible and was wondering how old a version of WordPress should I try and support? Are the majority of sites onto WordPress 3 and up? How many people are still using 2.9, 2.8? Does it make sense to go back to 2.6 is anyone using that anymore?

    Also any suggestions on how to test for compatibility with what ever version you are support. I found quite a few old links for a plugin compatibility checker from Brave New Code, but it doesn't appear to be there anymore. I haven't been able to find anything equivalent. Am I really going to have to setup a server for each version and either manually or some convoluted test script try and install new versions on each to test?

    Finally does anyone know of a comprehensive function matrix? Something that tells me what functions, filters, actions, options are available in each version.

    The reason I ask is I recently added a few calls to get_site_url() to my plugin and got a ton of complaints that it broke the install process as it throws a fatal error on activation. All from users on WordPress installs older than 3.0. I've since switched to site_url(), but would like to avoid breaking things in the future.

  2. Joey Kudish
    Member
    Posted 3 years ago #

    In my opinion, it all depends on what your plugin's functionality is all about.

    If it relies on custom post types, than obviously it will be 3.0+.
    If it relies on post formats, than it will be 3.1+.
    etc...

    I don't know of any automated version-checker for plugins. However, I do recommend you keep a few versions of WordPress installed locally. I have 2.9, 3.0, 3.1 and trunk installed.

    It's always good practice to add the following as an extra check if you don't want your plugin to throw fatal errors...
    if (function_exists('name_of_your_function'))

    There's no ideal solution. At some point it becomes the user's responsibility to update, and if they're running well-coded plugins and themes, they will never have upgrade issues. Ultimately, your users will always be running the latest version of WordPress, but obviously not everyone will.

    A few resources for finding hook and function information:
    http://adambrown.info/p/wp_hooks/
    http://phpxref.ftwr.co.uk/wordpress/nav.html?index.html
    and obviously, the codex on this website and digging through the source of WordPress itself, as most functions will specify in the comments since what version they exist (usually preceded with a @since).

    Good luck!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.