PluginProbe
Hostinger Tools / 2.0.4
Hostinger Tools v2.0.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 +17 -10 1.8.22.0.4 View file →
@@ -1,12 +1,11 @@
1 1 <?php
2 -
3 2 /**
4 3 * Plugin Name: Hostinger
5 4 * Plugin URI: https://hostinger.com
6 5 * Description: Hostinger WordPress plugin.
7 - * Version: 1.8.2
8 - * Requires at least: 5.6
6 + * Version: 2.0.4
7 + * Requires at least: 5.9
9 8 * Requires PHP: 7.4
10 9 * Author: Hostinger
11 10 * License: GPL v3
12 11 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -13,14 +12,15 @@
13 12 * Author URI: https://www.hostinger.com
14 13 * Text Domain: hostinger
15 14 * Domain Path: /languages
16 15 *
16 + * @package Hostinger
17 17 */
18 18
19 19 defined( 'ABSPATH' ) || exit;
20 20
21 21 if ( ! defined( 'HOSTINGER_VERSION' ) ) {
22 - define( 'HOSTINGER_VERSION', '1.8.2' );
22 + define( 'HOSTINGER_VERSION', '2.0.4' );
23 23 }
24 24
25 25 if ( ! defined( 'HOSTINGER_ABSPATH' ) ) {
26 26 define( 'HOSTINGER_ABSPATH', plugin_dir_path( __FILE__ ) );
@@ -38,15 +38,15 @@
38 38 define( 'HOSTINGER_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets' );
39 39 }
40 40
41 41 if ( ! defined( 'HOSTINGER_WP_CONFIG_PATH' ) ) {
42 - define( 'HOSTINGER_WP_CONFIG_PATH', ABSPATH . '/.private/config.json' );
42 + define( 'HOSTINGER_WP_CONFIG_PATH', ABSPATH . '.private/config.json' );
43 43 }
44 44
45 45 if ( ! defined( 'HOSTINGER_WP_TOKEN' ) ) {
46 - $path = explode('/', __DIR__);
47 - $serverRootPath = '/' . $path[1] . '/' . $path[2];
48 - define( 'HOSTINGER_WP_TOKEN', $serverRootPath . '/.api_token' );
46 + $hostinger_dir_parts = explode( '/', __DIR__ );
47 + $hostinger_server_root_path = '/' . $hostinger_dir_parts[1] . '/' . $hostinger_dir_parts[2];
48 + define( 'HOSTINGER_WP_TOKEN', $hostinger_server_root_path . '/.api_token' );
49 49 }
50 50
51 51 if ( ! defined( 'HOSTINGER_REST_URI' ) ) {
52 52 define( 'HOSTINGER_REST_URI', 'https://rest-hosting.hostinger.com' );
@@ -51,13 +51,19 @@
51 51 if ( ! defined( 'HOSTINGER_REST_URI' ) ) {
52 52 define( 'HOSTINGER_REST_URI', 'https://rest-hosting.hostinger.com' );
53 53 }
54 54
55 +/**
56 + * @return void
57 + */
55 58 function hostinger_activate(): void {
56 59 require_once HOSTINGER_ABSPATH . 'includes/class-hostinger-activator.php';
57 60 Hostinger_Activator::activate();
58 61 }
59 62
63 +/**
64 + * @return void
65 + */
60 66 function hostinger_deactivate(): void {
61 67 require_once HOSTINGER_ABSPATH . 'includes/class-hostinger-deactivator.php';
62 68 Hostinger_Deactivator::deactivate();
63 69 }
@@ -63,8 +69,9 @@
63 69 }
64 70
65 71 register_activation_hook( __FILE__, 'hostinger_activate' );
66 72 register_deactivation_hook( __FILE__, 'hostinger_deactivate' );
73 +
67 74 require_once HOSTINGER_ABSPATH . 'includes/class-hostinger.php';
68 75
69 -$plugin = new Hostinger();
70 -$plugin->run();
76 +$hostinger = new Hostinger();
77 +$hostinger->run();