简体   繁体   中英

Determine Joomla version in plugin

I'm making a simple Joomla plugin that loads a CSS file, but I want to load a different file for Joomla 2.5 and 3.2, using a PHP if-else statement. Is it possible to determine the Joomla version of the site using PHP?

You can use the named constant JVERSION or if you need more functions use the JVersion object like:

$j = new JVersion()
echo $j->getLongVersion();
echo $j->$RELEASE;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM