wordpress-activitypub/includes/debug.php
Konstantin Obenland 00a57c39a4
PHPCS: Enable Commenting sniff (#925)
* PHPCS: Enable Commenting sniff

* Apply suggestions from code review

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>

* Fix param alignment.

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-10-07 13:25:51 +02:00

22 lines
454 B
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' );