| @@ -1,15 +1,15 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: Media Cloud Sync |
| 4 | - * Version: 1.2.12 | |
| 5 | - * Description: Media Cloud Sync helps to sync your wordpress media to the cloud based services. | |
| 4 | + * Version: 1.4.0 | |
| 5 | + * Description: Media Cloud Sync helps to sync your wordpress media to the cloud based services like Amazon S3, DigitalOcean Spaces, Google Cloud Storage, Cloudflare R2 and S3 Compatible Services. | |
| 6 | 6 | * Author: Dudlewebs |
| 7 | 7 | * Author URI: http://dudlewebs.com |
| 8 | 8 | * License: GPLv2 or later |
| 9 | - * Requires at least: 5.2 | |
| 10 | - * Tested up to: 6.8 | |
| 11 | - * Requires PHP: 7.4 | |
| 9 | + * Requires at least: 5.9 | |
| 10 | + * Tested up to: 7.1 | |
| 11 | + * Requires PHP: 8.1 | |
| 12 | 12 | * Text Domain: media-cloud-sync |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | 15 | defined('ABSPATH') || exit; |
| @@ -17,9 +17,9 @@ | ||
| 17 | 17 | if (!defined('WPMCS_FILE')) { |
| 18 | 18 | define('WPMCS_FILE', __FILE__); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | -define('WPMCS_VERSION', '1.2.12'); | |
| 21 | +define('WPMCS_VERSION', '1.4.0'); | |
| 22 | 22 | define('WPMCS_PLUGIN_NAME', 'Media Cloud Sync'); |
| 23 | 23 | |
| 24 | 24 | define('WPMCS_TOKEN', 'wpmcs'); |
| 25 | 25 | define('WPMCS_PATH', plugin_dir_path(WPMCS_FILE)); |
| @@ -30,27 +30,16 @@ | ||
| 30 | 30 | define('WPMCS_INCLUDES_PATH', WPMCS_PATH . 'includes/'); |
| 31 | 31 | define('WPMCS_SDK_PATH', WPMCS_INCLUDES_PATH . 'sdk/'); |
| 32 | 32 | |
| 33 | 33 | define('WPMCS_ITEM_TABLE', WPMCS_TOKEN.'_items'); |
| 34 | -define('WPMCS_DB_VERSION', '1.0.2'); | |
| 34 | +define('WPMCS_DB_VERSION', '1.0.6'); | |
| 35 | +// Force DB upgrade using UI if needed | |
| 36 | +define('WPMCS_DB_UPGRADE_VERSION', '1.0.0'); | |
| 35 | 37 | |
| 36 | 38 | add_action('plugins_loaded', 'wpmcs_load_plugin_textdomain'); |
| 37 | 39 | |
| 38 | -if (!version_compare(PHP_VERSION, '7.4', '>=')) { | |
| 39 | - add_action('admin_notices', 'wpmcs_php_version_check_fail'); | |
| 40 | - return; | |
| 41 | -} elseif (!version_compare(get_bloginfo('version'), '5.2', '>=')) { | |
| 42 | - add_action('admin_notices', 'wpmcs_wp_version_check_fail'); | |
| 43 | - return; | |
| 44 | -} else { | |
| 45 | - //include services | |
| 46 | - require_once WPMCS_SDK_PATH . 's3/aws-autoloader.php'; | |
| 47 | - require_once WPMCS_SDK_PATH . 'google/autoload.php'; | |
| 40 | +require WPMCS_INCLUDES_PATH . 'main.php'; | |
| 48 | 41 | |
| 49 | - require WPMCS_INCLUDES_PATH . 'main.php'; | |
| 50 | -} | |
| 51 | - | |
| 52 | - | |
| 53 | 42 | /** |
| 54 | 43 | * Load Plugin textdomain. |
| 55 | 44 | * |
| 56 | 45 | * Load gettext translate for Plugin text domain. |
| @@ -60,37 +49,5 @@ | ||
| 60 | 49 | * |
| 61 | 50 | */ |
| 62 | 51 | function wpmcs_load_plugin_textdomain(){ |
| 63 | 52 | load_plugin_textdomain('media-cloud-sync'); |
| 64 | -} | |
| 65 | - | |
| 66 | -/** | |
| 67 | - * Plugin admin notice for minimum PHP version. | |
| 68 | - * | |
| 69 | - * Warning when the site doesn't have the minimum required PHP version. | |
| 70 | - * | |
| 71 | - * @return void | |
| 72 | - * @since 1.0.0 | |
| 73 | - * | |
| 74 | - */ | |
| 75 | -function wpmcs_php_version_check_fail(){ | |
| 76 | - /* translators: %s: PHP version. */ | |
| 77 | - $message = sprintf(esc_html__('%1$s requires PHP version %2$s+, plugin is currently not running.', 'media-cloud-sync'), WPMCS_PLUGIN_NAME, '7.4'); | |
| 78 | - $html_message = sprintf('<div class="error">%s</div>', wpautop($message)); | |
| 79 | - echo wp_kses_post($html_message); | |
| 80 | -} | |
| 81 | - | |
| 82 | -/** | |
| 83 | - * Plugin admin notice for minimum WordPress version. | |
| 84 | - * | |
| 85 | - * Warning when the site doesn't have the minimum required WordPress version. | |
| 86 | - * | |
| 87 | - * @return void | |
| 88 | - * @since 1.0.0 | |
| 89 | - * | |
| 90 | - */ | |
| 91 | -function wpmcs_wp_version_check_fail(){ | |
| 92 | - /* translators: %s: WordPress version. */ | |
| 93 | - $message = sprintf(esc_html__('%1$s requires WordPress version %2$s+. Because you are using an earlier version, the plugin is currently not running.', 'media-cloud-sync'), WPMCS_PLUGIN_NAME, '5.2'); | |
| 94 | - $html_message = sprintf('<div class="error">%s</div>', wpautop($message)); | |
| 95 | - echo wp_kses_post($html_message); | |
| 96 | 53 | } |