mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Route HEAD API requests through the GET callback method
fixes #34837 props danielbachhuber git-svn-id: https://develop.svn.wordpress.org/trunk@35758 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -780,7 +780,8 @@ class WP_REST_Server {
|
||||
$callback = $handler['callback'];
|
||||
$response = null;
|
||||
|
||||
if ( empty( $handler['methods'][ $method ] ) ) {
|
||||
$checked_method = 'HEAD' === $method ? 'GET' : $method;
|
||||
if ( empty( $handler['methods'][ $checked_method ] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user