PluginProbe
Hostinger Tools / 2.1.4
Hostinger Tools v2.1.4
3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.4 All 108 releases
← All changes | hostinger.php +15 -12 2.1.22.1.4 View file →
@@ -2,9 +2,9 @@
2 2 /**
3 3 * Plugin Name: Hostinger
4 4 * Plugin URI: https://hostinger.com
5 5 * Description: Hostinger WordPress plugin.
6 - * Version: 2.1.2
6 + * Version: 2.1.4
7 7 * Requires at least: 5.5
8 8 * Requires PHP: 7.4
9 9 * Author: Hostinger
10 10 * License: GPL v3
@@ -15,12 +15,16 @@
15 15 *
16 16 * @package Hostinger
17 17 */
18 18
19 +use Hostinger\Hostinger;
20 +use Hostinger\Activator;
21 +use Hostinger\Deactivator;
22 +
19 23 defined( 'ABSPATH' ) || exit;
20 24
21 25 if ( ! defined( 'HOSTINGER_VERSION' ) ) {
22 - define( 'HOSTINGER_VERSION', '2.1.2' );
26 + define( 'HOSTINGER_VERSION', '2.1.4' );
23 27 }
24 28
25 29 if ( ! defined( 'HOSTINGER_ABSPATH' ) ) {
26 30 define( 'HOSTINGER_ABSPATH', plugin_dir_path( __FILE__ ) );
@@ -51,31 +55,30 @@
51 55 if ( ! defined( 'HOSTINGER_REST_URI' ) ) {
52 56 define( 'HOSTINGER_REST_URI', 'https://rest-hosting.hostinger.com' );
53 57 }
54 58
59 +$vendor_file = __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
60 +
61 +if ( file_exists( $vendor_file ) ) {
62 + require_once $vendor_file;
63 +}
64 +
55 65 /**
56 66 * Plugin activation hook.
57 - *
58 - * @return void
59 67 */
60 68 function hostinger_activate(): void {
61 - require_once HOSTINGER_ABSPATH . 'includes/class-hostinger-activator.php';
62 - Hostinger_Activator::activate();
69 + Activator::activate();
63 70 }
64 71
65 72 /**
66 - * Plugin dectivation hook.
67 - *
68 - * @return void
73 + * Plugin deactivation hook.
69 74 */
70 75 function hostinger_deactivate(): void {
71 - require_once HOSTINGER_ABSPATH . 'includes/class-hostinger-deactivator.php';
72 - Hostinger_Deactivator::deactivate();
76 + Deactivator::deactivate();
73 77 }
74 78
75 79 register_activation_hook( __FILE__, 'hostinger_activate' );
76 80 register_deactivation_hook( __FILE__, 'hostinger_deactivate' );
77 81
78 -require_once HOSTINGER_ABSPATH . 'includes/class-hostinger.php';
79 82
80 83 $hostinger = new Hostinger();
81 84 $hostinger->run();