diff --git a/wp-content/plugins/activitypub/.distignore b/wp-content/plugins/activitypub/.distignore index 782f2e88..871e8074 100644 --- a/wp-content/plugins/activitypub/.distignore +++ b/wp-content/plugins/activitypub/.distignore @@ -15,6 +15,8 @@ Makefile README.md readme.md CODE_OF_CONDUCT.md +FEDERATION.md +SECURITY.md LICENSE.md _site _config.yml @@ -36,3 +38,4 @@ phpunit.xml.dist tests node_modules vendor +src diff --git a/wp-content/plugins/activitypub/LICENSE b/wp-content/plugins/activitypub/LICENSE index e59f0cc6..644800f2 100644 --- a/wp-content/plugins/activitypub/LICENSE +++ b/wp-content/plugins/activitypub/LICENSE @@ -1,6 +1,7 @@ MIT License Copyright (c) 2019 Matthias Pfefferle +Copyright (c) 2023 Automattic Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/wp-content/plugins/activitypub/activitypub.php b/wp-content/plugins/activitypub/activitypub.php index 7320f0c6..521a3795 100644 --- a/wp-content/plugins/activitypub/activitypub.php +++ b/wp-content/plugins/activitypub/activitypub.php @@ -3,7 +3,7 @@ * Plugin Name: ActivityPub * Plugin URI: https://github.com/pfefferle/wordpress-activitypub/ * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format. - * Version: 0.17.0 + * Version: 1.0.7 * Author: Matthias Pfefferle & Automattic * Author URI: https://automattic.com/ * License: MIT @@ -15,85 +15,124 @@ namespace Activitypub; +use function Activitypub\is_blog_public; +use function Activitypub\site_supports_blocks; + +require_once __DIR__ . '/includes/compat.php'; +require_once __DIR__ . '/includes/functions.php'; + /** - * Initialize plugin + * Initialize the plugin constants. */ -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_USERNAME_REGEXP' ) || \define( 'ACTIVITYPUB_USERNAME_REGEXP', '(?:([A-Za-z0-9_-]+)@((?:[A-Za-z0-9_-]+\.)+[A-Za-z]+))' ); - \defined( 'ACTIVITYPUB_ALLOWED_HTML' ) || \define( 'ACTIVITYPUB_ALLOWED_HTML', '