From e7d3cf9d68cc01f65911f6a69a3b4644ece2f1ca Mon Sep 17 00:00:00 2001 From: Greg Date: Fri, 13 Jan 2023 15:47:13 -0500 Subject: [PATCH] Convert template codes to shortcodes. As well as add new shortcodes for: [ap_hashcats] - The post's categories as hashtags [ap_image] - The URL for the post's featured image, full size [ap_thumbnail] - The URL for the post's featured image thumbnail size [ap_author] - The author's name [ap_authorurl] - The URL to the author's profile page [ap_date] - The post's date [ap_time] - The post's time [ap_datetime] - The post's date/time formated as "date @ time" [ap_blogurl] - The URL to the site [ap_blogname] - The name of the site [ap_blogdesc] - The description of the site --- activitypub.php | 2 +- includes/model/class-post.php | 232 +++++++++++++++++++++++++++++++--- templates/settings.php | 30 ++++- 3 files changed, 239 insertions(+), 25 deletions(-) diff --git a/activitypub.php b/activitypub.php index d9f2a61..b347814 100644 --- a/activitypub.php +++ b/activitypub.php @@ -22,7 +22,7 @@ function init() { \defined( 'ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS' ) || \define( 'ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS', 3 ); \defined( 'ACTIVITYPUB_HASHTAGS_REGEXP' ) || \define( 'ACTIVITYPUB_HASHTAGS_REGEXP', '(?:(?<=\s)|(?<=

)|(?<=
)|^)#([A-Za-z0-9_]+)(?:(?=\s|[[:punct:]]|$))' ); \defined( 'ACTIVITYPUB_ALLOWED_HTML' ) || \define( 'ACTIVITYPUB_ALLOWED_HTML', '