Created
February 16, 2015 01:10
-
-
Save mAAdhaTTah/e02875f6fe1a10bb51f5 to your computer and use it in GitHub Desktop.
PHP Version check for WP Boilerplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function activate() { | |
if ( ! version_compare( PHP_VERSION, '5.3', '<' ) ) { | |
return; | |
} | |
deactivate_plugins( 'url-embedlifier' ); | |
wp_die('<p>The <strong>URL Embedlifier</strong> plugin requires PHP version 5.3 or greater.</p>', | |
'Plugin Activation Error', array( 'response' => 200, 'back_link' => true ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment