| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /* |
| 3 | -Plugin Name: PageLayer | |
| 3 | +Plugin Name: Pagelayer | |
| 4 | 4 | Plugin URI: http://wordpress.org/plugins/pagelayer/ |
| 5 | -Description: PageLayer is a WordPress page builder plugin. Its very easy to use and very light on the browser. | |
| 6 | -Version: 1.0.2 | |
| 5 | +Description: Pagelayer is a WordPress page builder plugin. Its very easy to use and very light on the browser. | |
| 6 | +Version: 2.2.1 | |
| 7 | 7 | Author: Pagelayer Team |
| 8 | 8 | Author URI: https://pagelayer.com/ |
| 9 | 9 | License: LGPL v2.1 |
| 10 | 10 | License URI: http://www.gnu.org/licenses/lgpl-2.1.html |
| @@ -17,13 +17,36 @@ | ||
| 17 | 17 | echo 'You are not allowed to access this page directly.'; |
| 18 | 18 | exit; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | -$_tmp_plugins = get_option('active_plugins'); | |
| 21 | +$softac_tmp_plugins = get_option('active_plugins'); | |
| 22 | 22 | |
| 23 | 23 | // Is the premium plugin loaded ? |
| 24 | -if(in_array('pagelayer-pro/pagelayer-pro.php', $_tmp_plugins)){ | |
| 25 | - return; | |
| 24 | +if(!defined('SITEPAD') && in_array('pagelayer-pro/pagelayer-pro.php', $softac_tmp_plugins) ){ | |
| 25 | + | |
| 26 | + // Was introduced in 1.8.8 | |
| 27 | + $pagelayer_pro_info = get_option('pagelayer_pro_version'); | |
| 28 | + | |
| 29 | + if(!empty($pagelayer_pro_info) && version_compare($pagelayer_pro_info, '1.8.8', '>=')){ | |
| 30 | + // Let Pagelayer load | |
| 31 | + | |
| 32 | + // Lets check for older versions | |
| 33 | + }else{ | |
| 34 | + | |
| 35 | + if(!function_exists( 'get_plugin_data' )){ | |
| 36 | + include_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 37 | + } | |
| 38 | + | |
| 39 | + $pagelayer_pro_info = get_plugin_data(WP_PLUGIN_DIR . '/pagelayer-pro/pagelayer-pro.php'); | |
| 40 | + | |
| 41 | + if( | |
| 42 | + !empty($pagelayer_pro_info) && | |
| 43 | + version_compare($pagelayer_pro_info['Version'], '1.8.6', '<') | |
| 44 | + ){ | |
| 45 | + return; | |
| 46 | + } | |
| 47 | + | |
| 48 | + } | |
| 26 | 49 | } |
| 27 | 50 | |
| 28 | 51 | // If PAGELAYER_VERSION exists then the plugin is loaded already ! |
| 29 | 52 | if(defined('PAGELAYER_VERSION')) { |