Plugin Directory

Changeset 1248349


Ignore:
Timestamp:
09/18/2015 10:29:42 AM (11 years ago)
Author:
luisfpg
Message:

Improved the version check for PHP >= 5.3.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cyclos/trunk/cyclos.php

    r1243632 r1248349  
    3232defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    3333
     34$phpVersionOkForCyclos = version_compare(PHP_VERSION, '5.3.0', '>=');
     35
    3436function cyclos_plugin_activate() {
    35     if (version_compare(PHP_VERSION, '5.3.0') < 0) {
     37    global $phpVersionOkForCyclos;
     38    if (!$phpVersionOkForCyclos) {
    3639        wp_die('The Cyclos plugin requires at least PHP version 5.3. You have ' . PHP_VERSION);
    3740        deactivate_plugins( basename( __FILE__ ) );
     
    4043register_activation_hook( __FILE__, 'cyclos_plugin_activate' );
    4144
    42 include_once 'cyclos-common.php';
    43 include_once 'cyclos-admin.php';
    44 include_once 'cyclos-public.php';
     45if ($phpVersionOkForCyclos) {
     46    include_once 'cyclos-common.php';
     47    include_once 'cyclos-admin.php';
     48    include_once 'cyclos-public.php';
     49}
    4550?>
Note: See TracChangeset for help on using the changeset viewer.