WordPress.org

Ready to get started?Download WordPress

Forums

Query for WordPress Version Number/ What Variable? (3 posts)

  1. harknell
    Member
    Posted 5 years ago #

    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?

  2. MichaelH
    Member
    Posted 5 years ago #

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

    Variables are in wp-includes/version.php

  3. moose123
    Member
    Posted 4 years ago #

    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; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic