really-simple-ssl
Last commit date
assets
10 months ago
languages
10 months ago
lets-encrypt
10 months ago
lib
10 months ago
mailer
10 months ago
modal
10 months ago
onboarding
10 months ago
placeholders
10 months ago
progress
10 months ago
security
10 months ago
settings
10 months ago
testssl
10 months ago
upgrade
10 months ago
.wp-env.json
10 months ago
class-admin.php
10 months ago
class-cache.php
10 months ago
class-certificate.php
10 months ago
class-front-end.php
10 months ago
class-installer.php
10 months ago
class-mixed-content-fixer.php
10 months ago
class-multisite.php
10 months ago
class-server.php
10 months ago
class-site-health.php
10 months ago
class-wp-cli.php
10 months ago
compatibility.php
10 months ago
force-deactivate.txt
10 months ago
functions.php
10 months ago
index.php
10 months ago
readme.txt
10 months ago
rector.php
10 months ago
rlrsssl-really-simple-ssl.php
10 months ago
rsssl-auto-loader.php
10 months ago
security.md
10 months ago
ssl-test-page.php
10 months ago
system-status.php
10 months ago
uninstall.php
10 months ago
upgrade.php
10 months ago
compatibility.php
58 lines
| 1 | <?php |
| 2 | defined('ABSPATH') or die(); |
| 3 | /** |
| 4 | * File to prevent fatal errors when used with older pro versions |
| 5 | * @deprecated |
| 6 | */ |
| 7 | if ( is_admin() && rsssl_user_can_manage() ) { |
| 8 | class really_simple_ssl_legacy{ |
| 9 | public $site_has_ssl; |
| 10 | public $ssl_enabled; |
| 11 | public function generate_enable_link(){} |
| 12 | public function find_wp_config_path(){return '-';} |
| 13 | public function contains_hsts(){} |
| 14 | public function get_recommended_security_headers(){return [];} |
| 15 | public function notice_html(){} |
| 16 | } |
| 17 | class rsssl_help_legacy { |
| 18 | public function get_help_tip(){} |
| 19 | } |
| 20 | class rsssl_mixed_content_fixer_legacy { |
| 21 | public function fix_mixed_content(){} |
| 22 | } |
| 23 | class rsssl_multisite_legacy { |
| 24 | public $ssl_enabled_networkwide; |
| 25 | public $mixed_content_admin; |
| 26 | public $cert_expiration_warning; |
| 27 | public $selected_networkwide_or_per_site; |
| 28 | public function plugin_network_wide_active(){ |
| 29 | return false; |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | add_action('plugins_loaded', 'rsssl_compatibility_mode', 9); |
| 34 | function rsssl_compatibility_mode() { |
| 35 | if ( ! function_exists( 'get_plugin_data' ) ) { |
| 36 | require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); |
| 37 | } |
| 38 | $plugin_data = false; |
| 39 | $ms_file = WP_CONTENT_DIR . '/plugins/really-simple-ssl-pro-multisite/really-simple-ssl-pro-multisite.php'; |
| 40 | $pro_file = WP_CONTENT_DIR . '/plugins/really-simple-ssl-pro/really-simple-ssl-pro.php'; |
| 41 | if ( file_exists( $ms_file ) && is_plugin_active('really-simple-ssl-pro-multisite/really-simple-ssl-pro-multisite.php') ) { |
| 42 | $plugin_data = get_plugin_data( $ms_file, false, false ); |
| 43 | } else if ( file_exists( $pro_file ) && is_plugin_active('really-simple-ssl-pro/really-simple-ssl-pro.php')) { |
| 44 | $plugin_data = get_plugin_data( $pro_file, false, false ); |
| 45 | } |
| 46 | |
| 47 | if ( $plugin_data ) { |
| 48 | $version = $plugin_data['Version'] ?? false; |
| 49 | if ( version_compare( $version, '6.0', '<' ) ) { |
| 50 | REALLY_SIMPLE_SSL::instance()->really_simple_ssl = new really_simple_ssl_legacy(); |
| 51 | REALLY_SIMPLE_SSL::instance()->rsssl_mixed_content_fixer = new rsssl_mixed_content_fixer_legacy(); |
| 52 | REALLY_SIMPLE_SSL::instance()->rsssl_help = new rsssl_help_legacy(); |
| 53 | REALLY_SIMPLE_SSL::instance()->rsssl_multisite = new rsssl_multisite_legacy(); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | } |
| 58 | } |