debug.php in ActivityPub 4.1.1, at includes/debug.php
| 1 | <?php |
| 2 | /** |
| 3 | * Debugging functions. |
| 4 | * |
| 5 | * @package Activitypub |
| 6 | */ |
| 7 | |
| 8 | namespace Activitypub; |
| 9 | |
| 10 | /** |
| 11 | * Allow localhost URLs if WP_DEBUG is true. |
| 12 | * |
| 13 | * @param array $parsed_args An array of HTTP request arguments. |
| 14 | * |
| 15 | * @return array Array or string of HTTP request arguments. |
| 16 | */ |
| 17 | function allow_localhost( $parsed_args ) { |
| 18 | $parsed_args['reject_unsafe_urls'] = false; |
| 19 | |
| 20 | return $parsed_args; |
| 21 | } |
| 22 | add_filter( 'http_request_args', '\Activitypub\allow_localhost' ); |
| 23 |