dmhendricks / wordpress-base-plugin

A starter template for WordPress plugins, with autoloading, namespaces and object caching (where available).
GNU General Public License v2.0
83 stars 21 forks source link

Use WPUpdatePHP to check for PHP Version #3

Closed obstschale closed 7 years ago

obstschale commented 7 years ago

Add PHP Check wpupdatephp/wp-update-php.

I like to use WPupdatePHP in my plugins, because I thinks it is good practice to inform the user if their PHP version does not fit my requirements.

Especially useful, when PHP 7 is used in a Plugin.

dmhendricks commented 7 years ago

I'm not sure if this is spam, but I dig the idea. I will do it as time is available.

dmhendricks commented 7 years ago

I added it, but it's kind of odd. It makes me want to fork it... (If anyone is reading this, please fork it because I don't have the time)

dmhendricks commented 7 years ago

Hmm.. This can be accomplished with phpversion() and version_compare(). I think that I'm going to remove it.

obstschale commented 7 years ago

Sure you can use phpversion() and version_compare(), but I like the simplicity of WPupdatePHP because it will not only check for the required version but also will display an admin notice if the requirement does not meet.

In the end, I don't want to argue about any lib but that idea of informing the user to make it more user friendly :)

dmhendricks commented 7 years ago

My current plugin does check and displays a notice, however, I will give WPupdatePHP another look. Thank you.