| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Listdom |
| 4 |
* Plugin URI: https://totalery.com/listdom/ |
| 5 |
* Description: An advanced but simple tool to list everything on your website and show them in modern responsive skins like list, grid, map and masonry. |
| 6 |
* Version: 1.9.0 |
| 7 |
* Author: Totalery |
| 8 |
* Author URI: https://totalery.com/ |
| 9 |
* Requires at least: 4.0.0 |
| 10 |
* Tested up to: 5.5.3 |
| 11 |
* |
| 12 |
* Text Domain: listdom |
| 13 |
* Domain Path: /i18n/languages/ |
| 14 |
*/ |
| 15 |
|
| 16 |
// Initialize the Listdom or not?! |
| 17 |
$init = true; |
| 18 |
|
| 19 |
// Check Minimum PHP version |
| 20 |
if(version_compare(phpversion(), '5.3.10', '<')) |
| 21 |
{ |
| 22 |
$init = false; |
| 23 |
|
| 24 |
add_action('user_admin_notices', 'lsd_admin_notice_php_min_version'); |
| 25 |
function lsd_admin_notice_php_min_version() |
| 26 |
{ |
| 27 |
?> |
| 28 |
<div class="notice notice-error is-dismissible"> |
| 29 |
<p><?php echo sprintf(esc_html__("%s needs at-least PHP 5.3.10 or higher while your server PHP version is %s. Please contact your host provider and ask them to upgrade PHP of your server or change your host provider completely.", 'listdom'), '<strong>Listdom</strong>', '<strong>'.phpversion().'</strong>'); ?></p> |
| 30 |
</div> |
| 31 |
<?php |
| 32 |
} |
| 33 |
} |
| 34 |
|
| 35 |
// Check Minimum WP version |
| 36 |
global $wp_version; |
| 37 |
if(version_compare($wp_version, '4.0.0', '<')) |
| 38 |
{ |
| 39 |
$init = false; |
| 40 |
|
| 41 |
add_action('user_admin_notices', 'lsd_admin_notice_wp_min_version'); |
| 42 |
function lsd_admin_notice_wp_min_version() |
| 43 |
{ |
| 44 |
global $wp_version; |
| 45 |
?> |
| 46 |
<div class="notice notice-error is-dismissible"> |
| 47 |
<p><?php echo sprintf(esc_html__("%s needs at-least WordPress 4.0.0 or higher while your WordPress version is %s. Please update your WordPress to latest version first.", 'listdom'), '<strong>Listdom</strong>', '<strong>'.esc_html($wp_version).'</strong>'); ?></p> |
| 48 |
</div> |
| 49 |
<?php |
| 50 |
} |
| 51 |
} |
| 52 |
|
| 53 |
// Plugin initialized before! Maybe by Pro or Lite version |
| 54 |
if(function_exists('listdom')) $init = false; |
| 55 |
|
| 56 |
// Run the Listdom |
| 57 |
if($init) require_once 'LSD.php'; |