Skip to content

Instantly share code, notes, and snippets.

@mAAdhaTTah
Created February 16, 2015 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mAAdhaTTah/e02875f6fe1a10bb51f5 to your computer and use it in GitHub Desktop.
Save mAAdhaTTah/e02875f6fe1a10bb51f5 to your computer and use it in GitHub Desktop.
PHP Version check for WP Boilerplate
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