← All changes
|
includes/cli/class-hostinger-maintenance-command.php
+2
-3
1.9.7
→
2.0.7
View file →
| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | defined( 'ABSPATH' ) || exit; |
| 3 | 3 | |
| 4 | 4 | class Hostinger_Maintenance_Command { |
| 5 | 5 | public static function define_command(): void { |
| 6 | - WP_CLI::add_command( 'hostinger maintenance', Hostinger_Maintenance_Command::class ); | |
| 6 | + WP_CLI::add_command( 'hostinger maintenance', self::class ); | |
| 7 | 7 | } |
| 8 | 8 | /** |
| 9 | 9 | * Command allows enable/disable maintenance mode. |
| 10 | 10 | * |
| @@ -49,14 +49,13 @@ | ||
| 49 | 49 | * ## EXAMPLES |
| 50 | 50 | * |
| 51 | 51 | * # Get maintenance mode status |
| 52 | 52 | * $ wp hostinger maintenance status |
| 53 | - * | |
| 54 | 53 | */ |
| 55 | 54 | public function status(): bool { |
| 56 | 55 | $status = get_option( 'hostinger_maintenance_mode', 0 ); |
| 57 | 56 | |
| 58 | - if( $status ) { | |
| 57 | + if ( $status ) { | |
| 59 | 58 | WP_CLI::success( 'Maintenance mode ENABLED' ); |
| 60 | 59 | } else { |
| 61 | 60 | WP_CLI::success( 'Maintenance mode DISABLED' ); |
| 62 | 61 | } |