Docs: Align spelling with American English.

This changeset replaces "behaviour" with "behavior" in various docblocks.

Props kebbet, jrf.
See #56811, #56792.


git-svn-id: https://develop.svn.wordpress.org/trunk@54663 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras 2022-10-21 21:10:29 +00:00
parent b2a5db3938
commit 3adb24ff8c
16 changed files with 24 additions and 24 deletions

View File

@ -271,7 +271,7 @@ wp_enqueue_style( 'wp-edit-post' );
*/
do_action( 'enqueue_block_editor_assets' );
// In order to duplicate classic meta box behaviour, we need to run the classic meta box actions.
// In order to duplicate classic meta box behavior, we need to run the classic meta box actions.
require_once ABSPATH . 'wp-admin/includes/meta-boxes.php';
register_and_do_post_meta_boxes( $post );

View File

@ -852,7 +852,7 @@ $_old_files = array(
*
* The contents of this array indicate any new bundled plugins/themes which
* should be installed with the WordPress Upgrade. These items will not be
* re-installed in future upgrades, this behaviour is controlled by the
* re-installed in future upgrades, this behavior is controlled by the
* introduced version present here being older than the current installed version.
*
* The content of this array should follow the following format:

View File

@ -45,7 +45,7 @@ class WP_HTTP_Proxy {
/**
* Whether proxy connection should be used.
*
* Constants which control this behaviour:
* Constants which control this behavior:
*
* - `WP_PROXY_HOST`
* - `WP_PROXY_PORT`
@ -61,7 +61,7 @@ class WP_HTTP_Proxy {
/**
* Whether authentication should be used.
*
* Constants which control this behaviour:
* Constants which control this behavior:
*
* - `WP_PROXY_USERNAME`
* - `WP_PROXY_PASSWORD`

View File

@ -247,7 +247,7 @@ class WP_Http {
* - A WP_Error instance
* - boolean false to avoid short-circuiting the response
*
* Returning any other value may result in unexpected behaviour.
* Returning any other value may result in unexpected behavior.
*
* @since 2.9.0
*
@ -325,7 +325,7 @@ class WP_Http {
'hooks' => new WP_HTTP_Requests_Hooks( $url, $parsed_args ),
);
// Ensure redirects follow browser behaviour.
// Ensure redirects follow browser behavior.
$options['hooks']->register( 'requests.before_redirect', array( get_class(), 'browser_redirect_compatibility' ) );
// Validate redirected URLs.
@ -476,7 +476,7 @@ class WP_Http {
}
/**
* Match redirect behaviour to browser handling.
* Match redirect behavior to browser handling.
*
* Changes 302 redirects from POST to GET to match browser handling. Per
* RFC 7231, user agents can deviate from the strict reading of the

View File

@ -2027,7 +2027,7 @@ function get_link( $bookmark_id, $output = OBJECT, $filter = 'raw' ) {
* Checks and cleans a URL.
*
* A number of characters are removed from the URL. If the URL is for displaying
* (the default behaviour) ampersands are also replaced. The 'clean_url' filter
* (the default behavior) ampersands are also replaced. The 'clean_url' filter
* is applied to the returned cleaned URL.
*
* @since 1.2.0

View File

@ -943,7 +943,7 @@ function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = fals
return $string;
}
// Account for the previous behaviour of the function when the $quote_style is not an accepted value.
// Account for the previous behavior of the function when the $quote_style is not an accepted value.
if ( empty( $quote_style ) ) {
$quote_style = ENT_NOQUOTES;
} elseif ( ENT_XML1 === $quote_style ) {
@ -1023,7 +1023,7 @@ function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES ) {
return $string;
}
// Match the previous behaviour of _wp_specialchars() when the $quote_style is not an accepted value.
// Match the previous behavior of _wp_specialchars() when the $quote_style is not an accepted value.
if ( empty( $quote_style ) ) {
$quote_style = ENT_NOQUOTES;
} elseif ( ! in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) {
@ -4334,7 +4334,7 @@ function _deep_replace( $search, $subject ) {
* is preparing an array for use in an IN clause.
*
* NOTE: Since 4.8.3, '%' characters will be replaced with a placeholder string,
* this prevents certain SQLi attacks from taking place. This change in behaviour
* this prevents certain SQLi attacks from taking place. This change in behavior
* may cause issues for code that expects the return value of esc_sql() to be useable
* for other purposes.
*
@ -4354,7 +4354,7 @@ function esc_sql( $data ) {
* Checks and cleans a URL.
*
* A number of characters are removed from the URL. If the URL is for displaying
* (the default behaviour) ampersands are also replaced. The {@see 'clean_url'} filter
* (the default behavior) ampersands are also replaced. The {@see 'clean_url'} filter
* is applied to the returned cleaned URL.
*
* @since 2.8.0

View File

@ -8436,7 +8436,7 @@ function wp_fuzzy_number_match( $expected, $actual, $precision = 1 ) {
/**
* Sorts the keys of an array alphabetically.
* The array is passed by reference so it doesn't get returned
* which mimics the behaviour of ksort.
* which mimics the behavior of ksort.
*
* @since 6.0.0
*

View File

@ -3307,7 +3307,7 @@ function rest_get_endpoint_args_for_schema( $schema, $method = WP_REST_Server::C
* Converts an error to a response object.
*
* This iterates over all error codes and messages to change it into a flat
* array. This enables simpler client behaviour, as it is represented as a
* array. This enables simpler client behavior, as it is represented as a
* list in JSON rather than an object/map.
*
* @since 5.7.0

View File

@ -14,7 +14,7 @@
*
* Note: This implements ArrayAccess, and acts as an array of parameters when
* used in that manner. It does not use ArrayObject (as we cannot rely on SPL),
* so be aware it may have non-array behaviour in some cases.
* so be aware it may have non-array behavior in some cases.
*
* Note: When using features provided by ArrayAccess, be aware that WordPress deliberately
* does not distinguish between arguments of the same name for different request methods.

View File

@ -193,7 +193,7 @@ class WP_REST_Server {
* Converts an error to a response object.
*
* This iterates over all error codes and messages to change it into a flat
* array. This enables simpler client behaviour, as it is represented as a
* array. This enables simpler client behavior, as it is represented as a
* list in JSON rather than an object/map.
*
* @since 4.4.0

View File

@ -225,7 +225,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
$args
);
// Mimic the behaviour of `wp_edit_posts_query()`:
// Mimic the behavior of `wp_edit_posts_query()`:
if ( ! isset( $args['orderby'] ) ) {
$args['orderby'] = 'menu_order title';
$args['order'] = 'asc';

View File

@ -105,7 +105,7 @@ class Tests_Functions_CleanDirsizeCache extends WP_UnitTestCase {
}
/**
* Tests the behaviour of the function when the transient doesn't exist.
* Tests the behavior of the function when the transient doesn't exist.
*
* @ticket 52241
* @ticket 53635
@ -121,7 +121,7 @@ class Tests_Functions_CleanDirsizeCache extends WP_UnitTestCase {
}
/**
* Tests the behaviour of the function when the transient does exist, but is not an array.
* Tests the behavior of the function when the transient does exist, but is not an array.
*
* In particular, this tests that no PHP TypeErrors are being thrown.
*

View File

@ -942,7 +942,7 @@ class Tests_Functions_wpListUtil extends WP_UnitTestCase {
/**
* Tests non-existent '$orderby' fields.
*
* In PHP < 7.0.0, the sorting behaviour is different, which Core does not
* In PHP < 7.0.0, the sorting behavior is different, which Core does not
* currently handle. Until this is fixed, or the minimum PHP version is
* raised to PHP 7.0.0+, these tests will be skipped on PHP < 7.0.0.
*

View File

@ -992,7 +992,7 @@ class WP_Test_REST_Application_Passwords_Controller extends WP_Test_REST_Control
$actual = wp_is_application_passwords_supported();
// Revert to default behaviour so that other tests are not affected.
// Revert to default behavior so that other tests are not affected.
putenv( 'WP_ENVIRONMENT_TYPE' );
$this->assertTrue( $actual );
@ -1024,7 +1024,7 @@ class WP_Test_REST_Application_Passwords_Controller extends WP_Test_REST_Control
$actual = wp_is_application_passwords_available();
if ( 'default' === $expected ) {
// Revert to default behaviour so that other tests are not affected.
// Revert to default behavior so that other tests are not affected.
putenv( 'WP_ENVIRONMENT_TYPE' );
}

View File

@ -356,7 +356,7 @@ class Tests_Theme extends WP_UnitTestCase {
$this->assertNotFalse( $theme->errors() );
$this->assertFalse( $theme->exists() );
// These return the bogus name - perhaps not ideal behaviour?
// These return the bogus name - perhaps not ideal behavior?
$this->assertSame( $template, get_template() );
$this->assertSame( $style, get_stylesheet() );
}

View File

@ -59,7 +59,7 @@ assert( true === is_blog_installed() );
define( 'PHPUnit_MAIN_METHOD', false );
$original_wpdb = $GLOBALS['wpdb'];
// Hide warnings during testing, since that's the normal WP behaviour.
// Hide warnings during testing, since that's the normal WP behavior.
if ( ! WP_DEBUG ) {
error_reporting( E_ALL ^ E_NOTICE );
}