Title: wp_trusted_keys
Published: May 7, 2019
Last modified: May 20, 2026

---

# apply_filters( ‘wp_trusted_keys’, string[] $trusted_keys )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_trusted_keys/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_trusted_keys/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_trusted_keys/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_trusted_keys/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_trusted_keys/?output_format=md#wp--skip-link--target)

Filters the valid signing keys used to verify the contents of files.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_trusted_keys/?output_format=md#parameters)󠁿

 `$trusted_keys`string[]

The trusted keys that may sign packages.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_trusted_keys/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'wp_trusted_keys', $trusted_keys );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/file.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/file.php#L1551)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/file.php#L1551-L1551)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_trusted_keys/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_trusted_keys()](https://developer.wordpress.org/reference/functions/wp_trusted_keys/)`wp-admin/includes/file.php` |

Retrieves the list of signing keys trusted by WordPress.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_trusted_keys/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.2.0](https://developer.wordpress.org/reference/since/5.2.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_trusted_keys%2F)
before being able to contribute a note or feedback.