mirror of
https://github.com/Automattic/wordpress-activitypub
synced 2024-10-18 12:23:32 +00:00
00a57c39a4
* 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>
22 lines
454 B
PHP
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' );
|