From 38074d66e4f9da2b770d8d137c239939968584e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Tue, 31 Dec 2024 20:01:04 +0100 Subject: [PATCH] add attributed to meta for event posts --- includes/class-event-sources.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/includes/class-event-sources.php b/includes/class-event-sources.php index 960dc4c..881db58 100644 --- a/includes/class-event-sources.php +++ b/includes/class-event-sources.php @@ -94,7 +94,7 @@ class Event_Sources { 'type' => 'string', 'single' => false, 'sanitize_callback' => function ( $value ) { - return esc_sql( $value ); + return sanitize_url( $value ); }, ) ); @@ -108,11 +108,23 @@ class Event_Sources { 'type' => 'string', 'single' => false, 'sanitize_callback' => function ( $value ) { - return esc_sql( $value ); + return sanitize_url( $value ); }, ) ); } + + \register_post_meta( + $event_plugin_integration::get_post_type(), + '_event_bridge_for_activitypub_attributed_to', + array( + 'type' => 'string', + 'single' => false, + 'sanitize_callback' => function ( $value ) { + return sanitize_url( $value ); + }, + ) + ); } }