get_bloginfo( 'name' ) . ' - ' . __( 'Maintenance Mode', 'adminease' ), 'headline' => get_bloginfo( 'name' ), 'logo_url' => '', 'message' => __( 'We are currently performing scheduled maintenance.', 'adminease' ), 'primary_color' => '#0073aa', 'secondary_color' => '#23282d', 'text_color' => '#333333', 'schedule_end_ms' => null, ]; return wp_parse_args( $args, $defaults ); } /** * Returns the human-readable label for this theme, used in the theme registry select field. * @return string The theme label. */ public static function get_label(): string { return __( 'Classic', 'adminease' ); } /** * Retrieves the theme CSS content from a specified file path. * This method reads the CSS file used for the theme and returns its content as a string. * If the file content cannot be retrieved, an empty string is returned. * @return string The content of the theme CSS file, or an empty string if the content cannot be fetched. */ private static function get_theme_css(): string { $css_path = ADMINEASE_DIR . 'assets/css/AdminEaseMaintenanceMode.css'; $content = FileHandler::get_instance()->get_file_content( $css_path ); return ( false !== $content ) ? $content : ''; } /** * Retrieves the countdown JS content from a specified file path. * If the file content cannot be retrieved, an empty string is returned. * @return string The content of the theme JS file, or an empty string if the content cannot be fetched. */ private static function get_theme_js(): string { $js_path = ADMINEASE_DIR . 'assets/js/AdminEaseMaintenanceMode.js'; $content = FileHandler::get_instance()->get_file_content( $js_path ); return ( false !== $content ) ? $content : ''; } /** * Generates an HTML page template with customized data and styling. * * @param array $data An associative array containing page data such as 'page_title', 'logo_url', 'headline', and 'message'. * @param string $css A string containing custom CSS styles to be included within the HTML. * @param string $js A string containing the countdown JS to be included within the HTML. * * @return string The generated HTML content as a string. */ private static function generate_html( array $data, string $css, string $js = '' ): string { ob_start(); ?> >