From bf6cf24b17c00fdde493fdbf3b1cc3448b3c65d1 Mon Sep 17 00:00:00 2001 From: Greg Date: Fri, 13 Jan 2023 16:11:52 -0500 Subject: [PATCH] Add length to excerpt shortcode. --- activitypub.php | 1 + includes/model/class-post.php | 12 ++++++++++-- templates/settings.php | 14 ++++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/activitypub.php b/activitypub.php index b347814..6ae9dbc 100644 --- a/activitypub.php +++ b/activitypub.php @@ -19,6 +19,7 @@ namespace Activitypub; * Initialize plugin */ function init() { + \defined( 'ACTIVITYPUB_EXCERPT_LENGTH' ) || \define( 'ACTIVITYPUB_EXCERPT_LENGTH', 400 ); \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', '