| Server IP : 103.48.194.25 / Your IP : 216.73.216.74 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 8.2.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/sieuthimayasia.com/public_html/wp-content/plugins/wp-smtp/src/Mail/Migration/ |
Upload File : |
<?php
namespace SolidWP\Mail\Migration;
use SolidWP\Mail\Contracts\Service_Provider;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* The provider for all Admin related functionality.
*
* @since 1.3.0
*
* @package SolidWP\Mail
*/
class Provider extends Service_Provider {
/**
* Database version
*/
private const OPTION_VERSION_NAME = 'solid_smtp_version';
/**
* {@inheritdoc}
*/
public function register(): void {
$this->container->get( MigrationVer130::class )->register_hooks();
add_action( 'wp_loaded', fn() => $this->migrate() );
}
private function migrate(): void {
$version = get_option( self::OPTION_VERSION_NAME, '' );
if ( version_compare( $version, WPSMTP_VERSION, '==' ) ) {
return;
}
$this->container->get( MigrationVer130::class )->migration( $version );
$this->container->get( MigrationVer210::class )->migration( $version );
$this->container->get( MigrationVer221::class )->migration( $version );
$this->container->get( MigrationVer223::class )->migration( $version );
update_option( self::OPTION_VERSION_NAME, WPSMTP_VERSION );
}
}