From d1765b56dda78dda40b8b926114b697328c1348e Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Sat, 7 Jan 2023 15:35:14 +0100 Subject: [PATCH 1/5] configuration item for number of images to attach --- activitypub.php | 1 + includes/class-admin.php | 9 +++++++++ includes/model/class-post.php | 32 +++++++++++++++++--------------- templates/settings.php | 20 ++++++++++++++++++++ 4 files changed, 47 insertions(+), 15 deletions(-) diff --git a/activitypub.php b/activitypub.php index fe7809e..263a5ae 100644 --- a/activitypub.php +++ b/activitypub.php @@ -19,6 +19,7 @@ namespace Activitypub; * Initialize plugin */ function init() { + \defined( 'ACTIVITYPUB_NUMBER_IMAGES' ) || \define( 'ACTIVITYPUB_NUMBER_IMAGES', 3 ); \defined( 'ACTIVITYPUB_HASHTAGS_REGEXP' ) || \define( 'ACTIVITYPUB_HASHTAGS_REGEXP', '(?:(?<=\s)|(?<=

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