wp_internal_hosts
Filter HookDescription
Filters the array of URL hosts which are considered internal.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 4823 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$internal_hosts
|
An array of internal URL hostnames. |
Usage Examples
Basic Usage
<?php
// Hook into wp_internal_hosts
add_filter('wp_internal_hosts', 'my_custom_filter', 10, 1);
function my_custom_filter($internal_hosts) {
// Your custom filtering logic here
return $internal_hosts;
}
Source Code Context
wp-includes/link-template.php:4823
- How this hook is used in WordPress core
<?php
4818 *
4819 * @since 6.2.0
4820 *
4821 * @param string[] $internal_hosts An array of internal URL hostnames.
4822 */
4823 $internal_hosts = apply_filters(
4824 'wp_internal_hosts',
4825 array(
4826 wp_parse_url( home_url(), PHP_URL_HOST ),
4827 )
4828 );
PHP Documentation
<?php
/**
* Filters the array of URL hosts which are considered internal.
*
* @since 6.2.0
*
* @param string[] $internal_hosts An array of internal URL hostnames.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.