wp_trusted_keys
Filter HookDescription
Filters the valid signing keys used to verify the contents of files.Hook Information
File Location |
wp-admin/includes/file.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1557 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$trusted_keys
|
The trusted keys that may sign packages. |
Usage Examples
Basic Usage
<?php
// Hook into wp_trusted_keys
add_filter('wp_trusted_keys', 'my_custom_filter', 10, 1);
function my_custom_filter($trusted_keys) {
// Your custom filtering logic here
return $trusted_keys;
}
Source Code Context
wp-admin/includes/file.php:1557
- How this hook is used in WordPress core
<?php
1552 *
1553 * @since 5.2.0
1554 *
1555 * @param string[] $trusted_keys The trusted keys that may sign packages.
1556 */
1557 return apply_filters( 'wp_trusted_keys', $trusted_keys );
1558 }
1559
1560 /**
1561 * Determines whether the given file is a valid ZIP file.
1562 *
PHP Documentation
<?php
/**
* Filters the valid signing keys used to verify the contents of files.
*
* @since 5.2.0
*
* @param string[] $trusted_keys The trusted keys that may sign packages.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/file.php
Related Hooks
Related hooks will be displayed here in future updates.