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

Follow-up to [45232].

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48302 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-07-04 20:40:21 +00:00
parent 719cf5650a
commit c9b4885dc8
3 changed files with 9 additions and 5 deletions

View File

@ -8,7 +8,7 @@
/* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply, commentsBox */
/* global WPSetThumbnailHTML, wptitlehint */
// Backwards compatibility: prevent fatal errors.
// Backward compatibility: prevent fatal errors.
window.makeSlugeditClickable = window.editPermalink = function(){};
// Make sure the wp object exists.

View File

@ -473,7 +473,7 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
// This postmeta is used from version 5.4.
$archive_filename = get_post_meta( $request_id, '_export_file_name', true );
// These are used for backwards compatibility.
// These are used for backward compatibility.
$archive_url = get_post_meta( $request_id, '_export_file_url', true );
$archive_pathname = get_post_meta( $request_id, '_export_file_path', true );

View File

@ -1464,9 +1464,11 @@ function rest_validate_value_from_schema( $value, $args, $param = '' ) {
}
}
// The "format" keyword should only be applied to strings. However, for backwards compatibility,
// The "format" keyword should only be applied to strings. However, for backward compatibility,
// we allow the "format" keyword if the type keyword was not specified, or was set to an invalid value.
if ( isset( $args['format'] ) && ( ! isset( $args['type'] ) || 'string' === $args['type'] || ! in_array( $args['type'], $allowed_types, true ) ) ) {
if ( isset( $args['format'] )
&& ( ! isset( $args['type'] ) || 'string' === $args['type'] || ! in_array( $args['type'], $allowed_types, true ) )
) {
switch ( $args['format'] ) {
case 'hex-color':
if ( ! rest_parse_hex_color( $value ) ) {
@ -1652,7 +1654,9 @@ function rest_sanitize_value_from_schema( $value, $args ) {
}
// This behavior matches rest_validate_value_from_schema().
if ( isset( $args['format'] ) && ( ! isset( $args['type'] ) || 'string' === $args['type'] || ! in_array( $args['type'], $allowed_types, true ) ) ) {
if ( isset( $args['format'] )
&& ( ! isset( $args['type'] ) || 'string' === $args['type'] || ! in_array( $args['type'], $allowed_types, true ) )
) {
switch ( $args['format'] ) {
case 'hex-color':
return (string) sanitize_hex_color( $value );