| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Listdom |
| 4 |
* Plugin URI: https://listdom.net |
| 5 |
* Description: Listdom is a powerful yet easy-to-use tool for listing anything on your website. It offers modern, responsive skins such as List, Grid, Map, and Masonry to showcase your content beautifully. |
| 6 |
* Version: 6.0.0 |
| 7 |
* Author: Webilia |
| 8 |
* Author URI: https://webilia.com/ |
| 9 |
* Requires at least: 4.2 |
| 10 |
* Requires PHP: 7.4 |
| 11 |
* Tested up to: 7.1 |
| 12 |
* License: GPLv2 or later |
| 13 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 14 |
* |
| 15 |
* Text Domain: listdom |
| 16 |
* Domain Path: /i18n/languages/ |
| 17 |
*/ |
| 18 |
|
| 19 |
// No Direct Access |
| 20 |
defined('ABSPATH') || die(); |
| 21 |
|
| 22 |
// Initialize the Listdom or not?! |
| 23 |
$init = true; |
| 24 |
|
| 25 |
// Check Minimum PHP version |
| 26 |
if (version_compare(phpversion(), '7.4', '<')) |
| 27 |
{ |
| 28 |
$init = false; |
| 29 |
add_action('admin_notices', function () |
| 30 |
{ |
| 31 |
?> |
| 32 |
<div class="notice notice-error is-dismissible"> |
| 33 |
<p><?php echo sprintf( |
| 34 |
/* translators: 1: Plugin name, 2: Current PHP version. */ |
| 35 |
esc_html__("%1\$s requires at least PHP 7.4 or higher, but your server is currently running PHP %2\$s. Please contact your hosting provider to upgrade your PHP version or consider switching to a different host.", 'listdom'), |
| 36 |
'<strong>Listdom</strong>', |
| 37 |
'<strong>' . phpversion() . '</strong>' |
| 38 |
); ?></p> |
| 39 |
</div> |
| 40 |
<?php |
| 41 |
}); |
| 42 |
} |
| 43 |
|
| 44 |
// Check Minimum WP version |
| 45 |
global $wp_version; |
| 46 |
if (version_compare($wp_version, '4.0.0', '<')) |
| 47 |
{ |
| 48 |
$init = false; |
| 49 |
add_action('admin_notices', function () use ($wp_version) |
| 50 |
{ |
| 51 |
?> |
| 52 |
<div class="notice notice-error is-dismissible"> |
| 53 |
<p><?php echo sprintf( |
| 54 |
/* translators: 1: Plugin name, 2: Current WordPress version. */ |
| 55 |
esc_html__("%1\$s requires at least WordPress 4.0.0 or higher, but your current version is %2\$s. Please update WordPress to the latest version first.", 'listdom'), |
| 56 |
'<strong>Listdom</strong>', |
| 57 |
'<strong>' . esc_html($wp_version) . '</strong>' |
| 58 |
); ?></p> |
| 59 |
</div> |
| 60 |
<?php |
| 61 |
}); |
| 62 |
} |
| 63 |
|
| 64 |
// Plugin initialized before! Maybe by Pro or Lite version |
| 65 |
if (function_exists('listdom')) $init = false; |
| 66 |
|
| 67 |
// Run the Listdom |
| 68 |
if ($init) require_once 'LSD.php'; |
| 69 |
|