wp_trusted_keys

The timeline below displays how wordpress function wp_trusted_keys has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.6

/**
 * Retrieves the list of signing keys trusted by WordPress.
 *
 * @since 5.2.0
 *
 * @return string[] Array of base64-encoded signing keys.
 */
function wp_trusted_keys()
{
    $trusted_keys = array();
    if (time() < 1617235200) {
        // WordPress.org Key #1 - This key is only valid before April 1st, 2021.
        $trusted_keys[] = 'fRPyrxb/MvVLbdsYi+OOEv4xc+Eqpsj+kkAS6gNOkI0=';
    }
    // TODO: Add key #2 with longer expiration.
    /**
     * 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.
     */
    return apply_filters('wp_trusted_keys', $trusted_keys);
}

WordPress Version: 5.5

/**
 * Retrieves the list of signing keys trusted by WordPress.
 *
 * @since 5.2.0
 *
 * @return string[] Array of base64-encoded signing keys.
 */
function wp_trusted_keys()
{
    $trusted_keys = array();
    if (time() < 1617235200) {
        // WordPress.org Key #1 - This key is only valid before April 1st, 2021.
        $trusted_keys[] = 'fRPyrxb/MvVLbdsYi+OOEv4xc+Eqpsj+kkAS6gNOkI0=';
    }
    // TODO: Add key #2 with longer expiration.
    /**
     * Filter 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.
     */
    return apply_filters('wp_trusted_keys', $trusted_keys);
}

WordPress Version: 5.4

/**
 * Retrieve the list of signing keys trusted by WordPress.
 *
 * @since 5.2.0
 *
 * @return string[] Array of base64-encoded signing keys.
 */
function wp_trusted_keys()
{
    $trusted_keys = array();
    if (time() < 1617235200) {
        // WordPress.org Key #1 - This key is only valid before April 1st, 2021.
        $trusted_keys[] = 'fRPyrxb/MvVLbdsYi+OOEv4xc+Eqpsj+kkAS6gNOkI0=';
    }
    // TODO: Add key #2 with longer expiration.
    /**
     * Filter 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.
     */
    return apply_filters('wp_trusted_keys', $trusted_keys);
}

WordPress Version: 5.2

/**
 * Retrieve the list of signing keys trusted by WordPress.
 *
 * @since 5.2.0
 *
 * @return array List of base64-encoded Signing keys.
 */
function wp_trusted_keys()
{
    $trusted_keys = array();
    if (time() < 1617235200) {
        // WordPress.org Key #1 - This key is only valid before April 1st, 2021.
        $trusted_keys[] = 'fRPyrxb/MvVLbdsYi+OOEv4xc+Eqpsj+kkAS6gNOkI0=';
    }
    // TODO: Add key #2 with longer expiration.
    /**
     * Filter the valid Signing keys used to verify the contents of files.
     *
     * @since 5.2.0
     *
     * @param array $trusted_keys The trusted keys that may sign packages.
     */
    return apply_filters('wp_trusted_keys', $trusted_keys);
}