get_error_message() : 'Unknown'; // phpcs:ignore WordPress.PHP.DevelopmentFunctions \error_log( "[OUTBOX] Failed to add {$type}-Activity from: {$user_id} (Error: {$error_message}) with Activity: " . \print_r( $data, true ) ); } /** * Logs Follower notifications. * * @param array $result The result of the remote post request. * @param string $inbox The inbox URL. */ public static function log_sent_to_inbox( $result, $inbox ) { if ( \is_wp_error( $result ) ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions \error_log( "[DISPATCHER] Failed Request to: {$inbox} with Result: " . \print_r( $result, true ) ); } } /** * Write a log entry. * * @param mixed $log The log entry. */ public static function write_log( $log ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions \error_log( \print_r( $log, true ) ); } }