| @@ -1,8 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if ( ! defined( 'ABSPATH' ) ) exit; | |
| 4 | - | |
| 5 | 3 | class Hostinger_Errors { |
| 6 | 4 | |
| 7 | 5 | private $error_messages; |
| 8 | 6 | |
| @@ -8,15 +6,15 @@ | ||
| 8 | 6 | |
| 9 | 7 | public function __construct() { |
| 10 | 8 | $this->error_messages = array( |
| 11 | 9 | 'action_failed' => array( |
| 12 | - 'default' => esc_html__( 'Action Failed. Try again or contact support. Apologies.', 'hostinger' ), | |
| 10 | + 'default' => __( 'Action Failed. Try again or contact support. Apologies.', 'hostinger' ), | |
| 13 | 11 | ), |
| 14 | 12 | 'unexpected_error' => array( |
| 15 | - 'default' => esc_html__( 'An unexpected error occurred. Please try again or contact support.', 'hostinger' ), | |
| 13 | + 'default' => __( 'An unexpected error occurred. Please try again or contact support.', 'hostinger' ), | |
| 16 | 14 | ), |
| 17 | 15 | 'server_error' => array( |
| 18 | - 'default' => esc_html__( 'We apologize for the inconvenience. The AI content generation process encountered a server error. Please try again later, and if the issue persists, kindly contact our support team for assistance.', 'hostinger' ), | |
| 16 | + 'default' => __( 'We apologize for the inconvenience. The AI content generation process encountered a server error. Please try again later, and if the issue persists, kindly contact our support team for assistance.', 'hostinger' ), | |
| 19 | 17 | ), |
| 20 | 18 | ); |
| 21 | 19 | } |
| 22 | 20 | |
| @@ -25,9 +23,9 @@ | ||
| 25 | 23 | $message_data = $this->error_messages[ $error_code ]; |
| 26 | 24 | |
| 27 | 25 | return $message_data['default']; |
| 28 | 26 | } else { |
| 29 | - return esc_html__( 'Unknown error code.', 'hostinger' ); | |
| 27 | + return __( 'Unknown error code.', 'hostinger' ); | |
| 30 | 28 | } |
| 31 | 29 | } |
| 32 | 30 | |
| 33 | 31 | |