WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/18/2016 07:32:03 PM (3 years ago)
Author:
joehoyle
Message:

REST API: Change “ipv4” types to “ip” to support ipv6.

Stop presuming IP address are IPv4, instead make the type “ip” to be agnostic of IP version. This fixes requests with ipv6 addresses for comments in core.

Props dd32, schlessera, danielbachhuber.
Fixes #38818.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

    r39295 r39296  
    11161116                    'description'  => __( 'IP address for the object author.' ),
    11171117                    'type'         => 'string',
    1118                     'format'       => 'ipv4',
     1118                    'format'       => 'ip',
    11191119                    'context'      => array( 'edit' ),
    11201120                    'default'      => '127.0.0.1',
Note: See TracChangeset for help on using the changeset viewer.