Plugin Directory

Changeset 687610


Ignore:
Timestamp:
03/26/2013 03:59:00 PM (13 years ago)
Author:
Cyrille37
Message:

Add PHP version requirement check at startup (before include/require)

Location:
simple-photos-contest/trunk
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • simple-photos-contest/trunk

    • Property svn:ignore set to
      .gitignore
  • simple-photos-contest/trunk/controlers/SimplePhotosContest.php

    r683153 r687610  
    3333    const DBTABLE_PREFIX = 'spc';
    3434    const REQUIRE_VERSION_WP = '3.5';
    35     const REQUIRE_VERSION_PHP = '5.1.2';
     35    const REQUIRE_VERSION_PHP = '5.3.3';
    3636    const VERSION = '1.0';
    3737    const DBVERSION = '1.0';
  • simple-photos-contest/trunk/controlers/SimplePhotosContestAdmin.php

    r683153 r687610  
    5858        global $wp_version;
    5959
    60         if (version_compare(PHP_VERSION, '5.3.3', '<')) {
     60        if (version_compare(PHP_VERSION, self::REQUIRE_VERSION_PHP, '<')) {
    6161            wp_die('Need Php > ' . self::REQUIRE_VERSION_PHP);
    6262        }
  • simple-photos-contest/trunk/readme.txt

    r684076 r687610  
    3636== Installation ==
    3737
     38Requirements:
     39* Php >= 5.3.3
     40* Wordpress >= 3.5
     41
    38421. Upload `simple-photos-contest` directory to the `/wp-content/plugins/` directory
    39 1. Activate the plugin through the 'Plugins' menu in WordPress
    40 1. Place the code `[SimplePhotosContest]` in your page
     432. Activate the plugin through the 'Plugins' menu in WordPress
     443. Place the code `[SimplePhotosContest]` in your page
    4145
    4246== Screenshots ==
  • simple-photos-contest/trunk/simple-photos-contest.php

    r683153 r687610  
    2929
    3030    define('SIMPLE_PHOTOS_CONTEST', true);
    31         require_once( __DIR__ . '/controlers/SimplePhotosContest.php');
     31
     32    // FIXME: document why PHP version >= 5.3.3
     33    if (version_compare(PHP_VERSION, '5.3.3', '<')) {
     34        wp_die('Need Php > ' . self::REQUIRE_VERSION_PHP);
     35    }
     36
     37    require_once( __DIR__ . '/controlers/SimplePhotosContest.php');
    3238
    3339    global $gSPC;
Note: See TracChangeset for help on using the changeset viewer.