updated plugin ActivityPub version 1.3.0

This commit is contained in:
2023-12-08 23:23:11 +00:00
committed by Gitium
parent 96c0ee892f
commit ed9b10d2ea
52 changed files with 1618 additions and 607 deletions

View File

@ -41,9 +41,14 @@ class Webfinger {
* @return string|WP_Error The URL or WP_Error
*/
public static function resolve( $resource ) {
if ( ! $resource ) {
return null;
}
if ( ! preg_match( '/^@?' . ACTIVITYPUB_USERNAME_REGEXP . '$/i', $resource, $m ) ) {
return null;
}
$transient_key = 'activitypub_resolve_' . ltrim( $resource, '@' );
$link = \get_transient( $transient_key );