comment_ID, 'activitypub_status', true ); if ( $was_sent ) { // translators: %s is the federation state of the comment $comment_text .= '

' . sprintf( \__( 'Activitypub → (%s)', 'activitypub' ), $was_sent ) . '

'; } $was_received = \get_comment_meta( $comment->comment_ID, 'protocol', true ); if ( 'activitypub' === $was_received ) { $comment_text .= '

' . \__( '← ActivityPub', 'activitypub' ) . '

'; } return $comment_text; } // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed, VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable public static function log_remote_post_responses( $response, $url, $body, $user_id ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log, WordPress.PHP.DevelopmentFunctions.error_log_print_r \error_log( "Request to: {$url} with response: " . \print_r( $response, true ) ); } public static function write_log( $log ) { if ( \is_array( $log ) || \is_object( $log ) ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log, WordPress.PHP.DevelopmentFunctions.error_log_print_r \error_log( \print_r( $log, true ) ); } else { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log \error_log( $log ); } } }