http_origin
Filter HookDescription
Changes the origin of an HTTP request.Hook Information
File Location |
wp-includes/http.php
View on GitHub
|
Hook Type | Filter |
Line Number | 426 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$origin
|
The original origin for the request. |
Usage Examples
Basic Usage
<?php
// Hook into http_origin
add_filter('http_origin', 'my_custom_filter', 10, 1);
function my_custom_filter($origin) {
// Your custom filtering logic here
return $origin;
}
Source Code Context
wp-includes/http.php:426
- How this hook is used in WordPress core
<?php
421 *
422 * @since 3.4.0
423 *
424 * @param string $origin The original origin for the request.
425 */
426 return apply_filters( 'http_origin', $origin );
427 }
428
429 /**
430 * Retrieves list of allowed HTTP origins.
431 *
PHP Documentation
<?php
/**
* Changes the origin of an HTTP request.
*
* @since 3.4.0
*
* @param string $origin The original origin for the request.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/http.php
Related Hooks
Related hooks will be displayed here in future updates.