From 3dbd3e21ee7a28cc9a812ebf68078f62650ace38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Thu, 26 Sep 2024 15:51:23 +0200 Subject: [PATCH] phpdocs, phpcs --- includes/activitypub/transformer/class-event.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/includes/activitypub/transformer/class-event.php b/includes/activitypub/transformer/class-event.php index 04b53a4..be617c4 100644 --- a/includes/activitypub/transformer/class-event.php +++ b/includes/activitypub/transformer/class-event.php @@ -260,7 +260,15 @@ abstract class Event extends Post { return $summary; } - public static function remove_ap_permalink_from_template( $template) { + /** + * Remove the permalink shortcode from a WordPress template. + * + * This used for the summary template, because the summary usually gets, + * used when converting a object, where the URL is usually appended anyway. + * + * @param string $template The template string. + */ + public static function remove_ap_permalink_from_template( $template ) { $template = str_replace( '[ap_permalink]', '', $template ); $template = str_replace( '[ap_permalink type="html"]', '', $template );