hightrusted CAPTURE

API-Key holen unter capture.hightrusted.net

ID, '_hightrusted_capture_id', true); $verifyUrl = get_post_meta($post->ID, '_hightrusted_verify_url', true); $issuedAt = get_post_meta($post->ID, '_hightrusted_issued_at', true); if ($captureId) { ?>

✓ Capture vorhanden

Verifikations-Link

Zeitstempel:

Noch keine Capture für diesen Beitrag.

$apiKey]); $capture = $client->capture([ 'url' => get_permalink($postId), 'reference' => "wp-post:{$postId}", 'viewport' => ['width' => 1920, 'height' => 1080], ]); update_post_meta($postId, '_hightrusted_capture_id', $capture['id']); update_post_meta($postId, '_hightrusted_verify_url', $capture['verify_url']); update_post_meta($postId, '_hightrusted_issued_at', $capture['timestamp']['issued_at']); self::adminNotice('success', sprintf( 'hightrusted CAPTURE erstellt: Verifikations-Link', esc_url($capture['verify_url']), )); } catch (HightrustedException $e) { self::adminNotice('error', "hightrusted CAPTURE: {$e->getMessage()} (Code: {$e->errorCode})"); } } private static function adminNotice(string $type, string $message): void { $key = 'hightrusted_capture_notice'; set_transient($key, ['type' => $type, 'message' => $message], 30); add_action('admin_notices', function () use ($key) { $notice = get_transient($key); if (!$notice) return; delete_transient($key); printf( '

%s

', esc_attr($notice['type']), wp_kses_post($notice['message']), ); }); } } HightrustedCapturePlugin::init();