WordPress.org

Make WordPress Core

Ticket #46992: 46992.diff

File 46992.diff, 756 bytes (added by sudar, 8 months ago)
  • src/wp-includes/rest-api/class-wp-rest-server.php

     
    12661266         * @param array $headers Map of header name to header value.
    12671267         */
    12681268        public function send_headers( $headers ) {
     1269                /**
     1270                 * Filters the HTTP headers before they're sent to the browser for a REST request.
     1271                 *
     1272                 * @since 5.2.0
     1273                 *
     1274                 * @param string[] $headers Associative array of headers to be sent.
     1275                 */
     1276                $headers = apply_filters( 'wp_rest_headers', $headers );
     1277
    12691278                foreach ( $headers as $key => $value ) {
    12701279                        $this->send_header( $key, $value );
    12711280                }