From 6b8c427d014c38fa630ef9aba82c314fa9228e1d Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Fri, 5 May 2023 13:58:17 +0200 Subject: [PATCH 1/2] const to hide plugin recommendations --- activitypub.php | 1 + templates/welcome.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/activitypub.php b/activitypub.php index 8ca714e..5c3ff4a 100644 --- a/activitypub.php +++ b/activitypub.php @@ -20,6 +20,7 @@ namespace Activitypub; */ function init() { \defined( 'ACTIVITYPUB_EXCERPT_LENGTH' ) || \define( 'ACTIVITYPUB_EXCERPT_LENGTH', 400 ); + \defined( 'ACTIVITYPUB_SHOW_PLUGIN_RECOMMENDATIONS' ) || \define( 'ACTIVITYPUB_SHOW_PLUGIN_RECOMMENDATIONS', true ); \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_USERNAME_REGEXP' ) || \define( 'ACTIVITYPUB_USERNAME_REGEXP', '(?:([A-Za-z0-9_-]+)@((?:[A-Za-z0-9_-]+\.)+[A-Za-z]+))' ); diff --git a/templates/welcome.php b/templates/welcome.php index 6d6c24b..2b6a362 100644 --- a/templates/welcome.php +++ b/templates/welcome.php @@ -42,7 +42,7 @@ ); ?>

- +

@@ -93,4 +93,5 @@

+ From 6ba8156e50e2904fa61a1b28cf9df3632bed8e2f Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Fri, 5 May 2023 14:40:17 +0200 Subject: [PATCH 2/2] fix #320 --- includes/model/class-post.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/model/class-post.php b/includes/model/class-post.php index 2b6c84c..ccb161c 100644 --- a/includes/model/class-post.php +++ b/includes/model/class-post.php @@ -109,6 +109,12 @@ class Post { ), 'blockquote' => array(), 'cite' => array(), + 'code' => array( + 'class' => array(), + ), + 'pre' => array( + 'class' => array(), + ), ); /**