Make WordPress Core


Ignore:
Timestamp:
07/04/2020 08:40:21 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Correct spelling of "backward compatibility" per the Core Contributor Handbook glossary.

Follow-up to [45232].

See #49572.

File:
1 edited

Legend:

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

    r48300 r48302  
    14651465    }
    14661466
    1467     // The "format" keyword should only be applied to strings. However, for backwards compatibility,
     1467    // The "format" keyword should only be applied to strings. However, for backward compatibility,
    14681468    // we allow the "format" keyword if the type keyword was not specified, or was set to an invalid value.
    1469     if ( isset( $args['format'] ) && ( ! isset( $args['type'] ) || 'string' === $args['type'] || ! in_array( $args['type'], $allowed_types, true ) ) ) {
     1469    if ( isset( $args['format'] )
     1470        && ( ! isset( $args['type'] ) || 'string' === $args['type'] || ! in_array( $args['type'], $allowed_types, true ) )
     1471    ) {
    14701472        switch ( $args['format'] ) {
    14711473            case 'hex-color':
     
    16531655
    16541656    // This behavior matches rest_validate_value_from_schema().
    1655     if ( isset( $args['format'] ) && ( ! isset( $args['type'] ) || 'string' === $args['type'] || ! in_array( $args['type'], $allowed_types, true ) ) ) {
     1657    if ( isset( $args['format'] )
     1658        && ( ! isset( $args['type'] ) || 'string' === $args['type'] || ! in_array( $args['type'], $allowed_types, true ) )
     1659    ) {
    16561660        switch ( $args['format'] ) {
    16571661            case 'hex-color':
Note: See TracChangeset for help on using the changeset viewer.