# activitypub/4.4.0/includes/debug.php

ActivityPub, version 4.4.0. 23 lines.

- Page: https://pluginprobe.com/plugins/activitypub/4.4.0/code/includes/debug.php
- Raw: https://pluginprobe.com/plugins/activitypub/4.4.0/raw/includes/debug.php
- Modified: 2024-10-09T10:59:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/activitypub/4.4.0/code/includes/debug.php#L10-L20`.

```php
<?php
/**
 * Debugging functions.
 *
 * @package Activitypub
 */

namespace Activitypub;

/**
 * Allow localhost URLs if WP_DEBUG is true.
 *
 * @param array $parsed_args An array of HTTP request arguments.
 *
 * @return array Array or string of HTTP request arguments.
 */
function allow_localhost( $parsed_args ) {
	$parsed_args['reject_unsafe_urls'] = false;

	return $parsed_args;
}
add_filter( 'http_request_args', '\Activitypub\allow_localhost' );

```
