Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-04-23 21:44:59
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Test TXP version in plugin
What’s the best way of testing the TXP version from within a plugin? Is there a standard behind-the-scenes function?
With the great features in 4.0.9 (pluggable_ui & plugin options) it would be useful if there was something to test if the version was a specified level or above.
Thanks,
Adi
Offline
Re: Test TXP version in plugin
if (version_compare(txp_version, '4.0.9', '<'))
exit('4.0.9 is required.');
else
// install
Offline
#3 2009-04-23 23:00:09
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Test TXP version in plugin
Perfect … thanks Jon-Michael.
Offline
Re: Test TXP version in plugin
How about checking for version greater than 4.0.6?
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Test TXP version in plugin
gomedia wrote:
Perfect … thanks Jon-Michael.
No problem.
MattD wrote:
How about checking for version greater than 4.0.6?
Were you looking for something like the following?
if (version_compare(txp_version, '4.0.6', '>'))
Or:
if (version_compare(txp_version, '4.0.7', '>='))
Offline
Pages: 1