WordPress.org

Support

Support » Plugins and Hacks » Query for WordPress Version Number/ What Variable?

Query for WordPress Version Number/ What Variable?

  • Hi everyone. Since we are seeing many changes to paths and other elements of the Plugin structure I’d like to make my Plugins backwardly compatible with previous versions of WordPress. What I’m not sure of is how to do a query within WordPress to determine what version is running. Is there a Global variable that holds this info that I can check? Or a DB location that holds this? I haven’t seen it anywhere listed.

    If there isn’t any of the above has anyone ever released code to do this an alternate way?

Viewing 2 replies - 1 through 2 (of 2 total)
  • <?php echo 'version is ' . $wp_version; ?>
    <?php echo 'database version is ' . $wp_db_version; ?>

    Variables are in wp-includes/version.php

    Thanks for this great tip. Strange, tho, I got this to write out the version:

    <?php echo 'version is ' . $wp_version; ?>

    …but not this:

    <?php echo 'version is ' . $wpmu_version; ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Query for WordPress Version Number/ What Variable?’ is closed to new replies.