wp_signature_hosts
Filter HookDescription
Filters the list of hosts which should have Signature Verification attempted on.Hook Information
File Location |
wp-admin/includes/file.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1282 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$hostnames
|
List of hostnames. |
Usage Examples
Basic Usage
<?php
// Hook into wp_signature_hosts
add_filter('wp_signature_hosts', 'my_custom_filter', 10, 1);
function my_custom_filter($hostnames) {
// Your custom filtering logic here
return $hostnames;
}
Source Code Context
wp-admin/includes/file.php:1282
- How this hook is used in WordPress core
<?php
1277 *
1278 * @since 5.2.0
1279 *
1280 * @param string[] $hostnames List of hostnames.
1281 */
1282 $signed_hostnames = apply_filters( 'wp_signature_hosts', array( 'wordpress.org', 'downloads.wordpress.org', 's.w.org' ) );
1283
1284 $signature_verification = in_array( parse_url( $url, PHP_URL_HOST ), $signed_hostnames, true );
1285 }
1286
1287 // Perform signature validation if supported.
PHP Documentation
<?php
/**
* Filters the list of hosts which should have Signature Verification attempted on.
*
* @since 5.2.0
*
* @param string[] $hostnames List of hostnames.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/file.php
Related Hooks
Related hooks will be displayed here in future updates.