Jump to main content Jump to doc navigation

modX::getVersionData

Gets the modX core version data. The array contains the following keys (examples for version "MODX Revolution 2.0.0-beta-3"):

  • version - The current version number, eg: 2
  • major_version - The current major version number, eg: 0
  • minor_version - The current minor version number, eg: 0
  • patch_level - The current release level, eg: 'beta-3'
  • code_name - The code name for the product, eg: 'Revolution'
  • full_version - A compiled full version name, eg: '2.0.0-beta-3'
  • full_appname - The entire version name, eg: 'MODX Revolution 2.0.0-beta-3'

Syntax

API Doc: modX::getVersionData()

array getVersionData ()

Example

Print out the current full version:

$vers = $modx->getVersionData();
echo $vers['full_version'];

See Also

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Dannevang Digital
  • Sepia River Studios
  • CrewMark
  • Chris Fickling
  • deJaya
  • eydolan
  • Lefthandmedia
  • Murray Wood
  • Following Sea
  • Anton Tarasov
  • Stéphane Jäggi
  • Raffy
  • Snow Creative
  • A. Moreno
  • Nick Clark
  • JT Skaggs
  • Helen
  • YJ
  • krisznet
  • Richard
  • Yanni

Budget

$306 per month—let's make that $500!

Learn more