From cc168c7d40c709090831afafaeb8fc7240d03464 Mon Sep 17 00:00:00 2001 From: Matt Wiebe Date: Tue, 18 Jul 2023 15:13:53 -0500 Subject: [PATCH] more lint nom --- includes/class-health-check.php | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/includes/class-health-check.php b/includes/class-health-check.php index 02ebfcf..18cd48e 100644 --- a/includes/class-health-check.php +++ b/includes/class-health-check.php @@ -204,21 +204,32 @@ class Health_Check { $url = \Activitypub\Webfinger::resolve( $account ); if ( \is_wp_error( $url ) ) { + $allowed = array( 'code' => array() ); + $not_accessible = wp_kses( + // translators: %s: Author URL + \__( + 'Your WebFinger endpoint %s is not accessible. Please check your WordPress setup or permalink structure.', + 'activitypub' + ), + $allowed + ); + $invalid_response = wp_kses( + // translators: %s: Author URL + \__( + 'Your WebFinger endpoint %s does not return valid JSON for application/jrd+json.', + 'activitypub' + ), + $allowed + ); + $health_messages = array( 'webfinger_url_not_accessible' => \sprintf( - // translators: %s: Author URL - \__( - '

Your WebFinger endpoint %s is not accessible. Please check your WordPress setup or permalink structure.

', - 'activitypub' - ), + $not_accessible, $url->get_error_data() ), 'webfinger_url_invalid_response' => \sprintf( // translators: %s: Author URL - \__( - 'Your WebFinger endpoint %s does not return valid JSON for application/jrd+json.', - 'activitypub' - ), + $invalid_response, $url->get_error_data() ), );