'; echo ''; echo '' . esc_html($title) . ' - ' . esc_html(get_bloginfo('name')) . ''; \wp_head(); echo ''; echo '
'; echo '

' . esc_html($title) . '

'; echo '

' . esc_html($message) . '

'; if (!empty($actions)) { echo '

'; foreach ($actions as $a) { $href = (string) ($a['href'] ?? home_url('/')); $label = (string) ($a['label'] ?? __('Back', '2download-connector')); $primary = !empty($a['primary']); $class = $primary ? 'button button-primary wp-element-button' : 'button'; echo '' . esc_html($label) . ''; } echo '

'; } else { echo '

' . esc_html(__('Go to homepage', '2download-connector')) . '

'; } echo '
'; \wp_footer(); echo ''; exit; } public static function account_url(): string { $settings = get_option('ToDownload_settings', []); if (!is_array($settings)) { $settings = []; } $id = (int) ($settings['account_page_id'] ?? 0); if ($id > 0) { $url = (string) get_permalink($id); return $url !== '' ? $url : home_url('/'); } return home_url('/'); } public static function cart_url(): string { $settings = get_option('ToDownload_settings', []); if (!is_array($settings)) { $settings = []; } $id = (int) ($settings['cart_page_id'] ?? 0); if ($id > 0) { $url = (string) get_permalink($id); return $url !== '' ? $url : home_url('/'); } return home_url('/'); } }