Plugin Directory

Changeset 1243632


Ignore:
Timestamp:
09/11/2015 07:51:52 PM (10 years ago)
Author:
luisfpg
Message:

Improve the error when the PHP check fails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cyclos/trunk/cyclos.php

    r1238070 r1243632  
    3232defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    3333
    34 if(version_compare(PHP_VERSION, '5.3.0') < 0) {
    35     exit('You are currently using PHP version <strong>' . PHP_VERSION . '</strong>. For this plugin to run you need at least PHP version <strong> 5.3.0</strong> or higher.'); 
     34function cyclos_plugin_activate() {
     35    if (version_compare(PHP_VERSION, '5.3.0') < 0) {
     36        wp_die('The Cyclos plugin requires at least PHP version 5.3. You have ' . PHP_VERSION);
     37        deactivate_plugins( basename( __FILE__ ) );
     38    }
    3639}
     40register_activation_hook( __FILE__, 'cyclos_plugin_activate' );
    3741
    3842include_once 'cyclos-common.php';
    3943include_once 'cyclos-admin.php';
    4044include_once 'cyclos-public.php';
    41 
    4245?>
Note: See TracChangeset for help on using the changeset viewer.