Plugin Directory

Changeset 1185374


Ignore:
Timestamp:
06/22/2015 08:17:50 AM (11 years ago)
Author:
FreshMail.com
Message:

Fix: Info about required PHP version (5.3 or higher)

Location:
freshmail-newsletter/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • freshmail-newsletter/trunk/CHANGELOG.md

    r1182478 r1185374  
    11### Changelog
     2
     3- 2.0.2 - 2015-06-22
     4    * Fix: Info about required PHP version (5.3 or higher)
    25
    36- 2.0.1 - 2015-06-17
  • freshmail-newsletter/trunk/wp-freshmail.php

    r1182478 r1185374  
    44 * Plugin URI: http://freshmail.com/plugin/wordpress-newsletter/
    55 * Description: FreshMail is an email marketing tool for creating and sending amazing newsletters. Our intuitive system leads users from campaign planning and creation to final reports. A free account lets you send up to 2000 messages to a maximum of 500 recipients each month.
    6  * Version: 2.0.1
     6 * Version: 2.0.2
    77 * Author: Borbis Media
    88 * Author URI: http://www.borbis.com
    99 */
    1010
    11 // Define plugin directory for inclusions
    12 if (!defined('WP_FRESHMAIL_DIR')) {
    13     define('WP_FRESHMAIL_DIR', dirname(__FILE__));
    14 }
    15 
    16 // Define plugin URL for assets
    17 if (!defined('WP_FRESHMAIL_URL')) {
    18     define('WP_FRESHMAIL_URL', plugins_url('', __FILE__));
    19 }
    20 
    21 // Define plugin version for upgrade
    22 if (!defined('WP_FRESHMAIL_VERSION')) {
    23     define('WP_FRESHMAIL_VERSION', '2.0.1');
    24 }
    25 
    26 add_action('plugins_loaded', function (){
    27 
    28     // plugin use classes with namespaces
    29     if (version_compare(PHP_VERSION, '5.3.0', '<')) {
    30         add_action('admin_notices', function (){
    31             echo '<div class="error"><p>Freshmail Plugin requires php 5.3 or greater!</p></div>';
    32         });
    33     } else {
     11
     12// plugin use classes with namespaces and anonymous functions
     13if (version_compare(PHP_VERSION, '5.3.0', '<')) {
     14    add_action('admin_notices', function (){
     15        echo '<div class="error"><p>Freshmail Plugin requires php 5.3 or greater!</p></div>';
     16    });
     17} else {
     18
     19    // Define plugin directory for inclusions
     20    if (!defined('WP_FRESHMAIL_DIR')) {
     21        define('WP_FRESHMAIL_DIR', dirname(__FILE__));
     22    }
     23
     24    // Define plugin URL for assets
     25    if (!defined('WP_FRESHMAIL_URL')) {
     26        define('WP_FRESHMAIL_URL', plugins_url('', __FILE__));
     27    }
     28
     29    // Define plugin version for upgrade
     30    if (!defined('WP_FRESHMAIL_VERSION')) {
     31        define('WP_FRESHMAIL_VERSION', '2.0.2');
     32    }
     33
     34    add_action('plugins_loaded', function (){
    3435
    3536        $currentVersion = get_option('WP_FRESHMAIL_VERSION', 0);
     
    871872            });
    872873        }
    873     }
    874 });
    875 
     874    });
     875
     876}
Note: See TracChangeset for help on using the changeset viewer.