| @@ -17,8 +17,20 @@ | ||
| 17 | 17 | public function run(): void { |
| 18 | 18 | $this->bootstrap(); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | + /** | |
| 22 | + * Define constant | |
| 23 | + * | |
| 24 | + * @param string $name Constant name. | |
| 25 | + * @param string|bool $value Constant value. | |
| 26 | + */ | |
| 27 | + private function define( string $name, $value ): void { | |
| 28 | + if ( ! defined( $name ) ) { | |
| 29 | + define( $name, $value ); | |
| 30 | + } | |
| 31 | + } | |
| 32 | + | |
| 21 | 33 | private function get_plugin_version(): string { |
| 22 | 34 | if ( defined( 'HOSTINGER_VERSION' ) ) { |
| 23 | 35 | return HOSTINGER_VERSION; |
| 24 | 36 | } |