Make WordPress Core


Ignore:
Timestamp:
12/03/2015 04:34:00 PM (9 years ago)
Author:
markjaquith
Message:

Route HEAD API requests through the GET callback method

fixes #34837
props danielbachhuber

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r35741 r35758  
    781781                $response = null;
    782782
    783                 if ( empty( $handler['methods'][ $method ] ) ) {
     783                $checked_method = 'HEAD' === $method ? 'GET' : $method;
     784                if ( empty( $handler['methods'][ $checked_method ] ) ) {
    784785                    continue;
    785786                }
Note: See TracChangeset for help on using the changeset viewer.