WordPress.org

Make WordPress Core

Ticket #40444: 40444.patch

File 40444.patch, 587 bytes (added by zinigor, 3 years ago)

Replaces manual header output with the nocache_headers function.

  • src/wp-includes/rest-api/class-wp-rest-server.php

     
    251251                 */
    252252                $send_no_cache_headers = apply_filters( 'rest_send_nocache_headers', is_user_logged_in() );
    253253                if ( $send_no_cache_headers ) {
    254                         foreach ( wp_get_nocache_headers() as $header => $header_value ) {
    255                                 $this->send_header( $header, $header_value );
    256                         }
     254                        nocache_headers();
    257255                }
    258256
    259257                /**