Skip to content

Commit 92c0533

Browse files
committed
Use American English in the core class references
Prose only — code identifiers such as color-field are unchanged.
1 parent 0c629f2 commit 92c0533

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎docs/02-wzsa-core-classes/field-types-reference.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ An unrecognised `type` falls through to `callback_missing()`, which prints a not
2525
| `password` | Password input | Sanitized with `sanitize_text_field()`. Use `sensitive` for API keys. |
2626
| `sensitive` | Password-style input | Value is encrypted at rest and masked in the UI, showing only the last four characters. |
2727
| `number` | Number input | Uses `min`, `max`, and `step`. |
28-
| `color` | Colour picker | Adds the `color-field` class and enqueues `wp-color-picker`. |
28+
| `color` | Color picker | Adds the `color-field` class and enqueues `wp-color-picker`. |
2929
| `file` | Input plus a **Choose File** button | Opens the media uploader. Override the button label with `'options' => array( 'button_label' => … )`. Sanitized with `esc_url_raw()`. |
3030

3131
## Multi-line
@@ -94,7 +94,7 @@ An unrecognised `type` falls through to `callback_missing()`, which prints a not
9494

9595
Each row carries a hidden `row_id` so rows stay identifiable across saves and reordering. Sub-field HTML can be filtered with `{$prefix}_repeater_field_{$type}`.
9696

97-
## Shared behaviour
97+
## Shared behavior
9898

9999
- `field_class` adds CSS classes; each class is passed through `sanitize_html_class()`.
100100
- `field_attributes` renders arbitrary HTML attributes as `attribute => value`.

‎docs/02-wzsa-core-classes/sanitization-reference.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Every callback receives the field configuration as its second argument, which is
2626

2727
## Callbacks by type
2828

29-
| Method | Applies to | Behaviour |
29+
| Method | Applies to | Behavior |
3030
|---|---|---|
3131
| `sanitize_text_field()` | `text`, and most text-like types | Delegates to `sanitize_textarea_field()`. |
3232
| `sanitize_textarea_field()` | `textarea`, `css`, `html`, `wysiwyg` | `wp_kses()` against `$allowedposttags` extended with `script`, `style`, and `link` tags, filterable via `{$prefix}_sanitize_allowed_tags`. |
@@ -60,7 +60,7 @@ Every callback receives the field configuration as its second argument, which is
6060

6161
## Helper
6262

63-
`sanitize_tax_slugs( &$settings, $source_key, $target_key )` is a static helper for taxonomy pickers. It parses values in the `Name (taxonomy:term_taxonomy_id)` format, resolves each to a real term, and writes the term taxonomy IDs into `$target_key` while normalising the display slugs in `$source_key`. Plain category names are still accepted for backwards compatibility.
63+
`sanitize_tax_slugs( &$settings, $source_key, $target_key )` is a static helper for taxonomy pickers. It parses values in the `Name (taxonomy:term_taxonomy_id)` format, resolves each to a real term, and writes the term taxonomy IDs into `$target_key` while normalizing the display slugs in `$source_key`. Plain category names are still accepted for backwards compatibility.
6464

6565
## Overriding a sanitizer
6666

‎docs/02-wzsa-core-classes/the-defaults-contract.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Four rules govern the array. Breaking any of them produces a defect that phpcs,
1717

1818
Nothing in the array may translate, and nothing it calls may translate transitively. Avoiding the translation stack is the entire reason the array exists.
1919

20-
## 2. Values are pre-normalised
20+
## 2. Values are pre-normalized
2121

2222
Each value must already match what `settings_defaults()` emits **after** its casts. Checkbox defaults are `1` and `0`, never `true` and `false`. A `false` where the saved default is `0` breaks block attributes and REST schemas typed as `number`.
2323

@@ -37,13 +37,13 @@ A default that must be translated or computed at runtime cannot live in the arra
3737
$title = my_plugin_get_option( 'toc_title', __( 'Table of Contents', 'my-plugin' ) );
3838
```
3939

40-
## Initialise `$prefix` at declaration
40+
## Initialize `$prefix` at declaration
4141

4242
```php
4343
public static $prefix = 'my_plugin';
4444
```
4545

46-
`Settings::$prefix` must be initialised where it is declared, not only in the constructor. The static methods are reachable on the frontend, where the `Settings` object is never instantiated, and a null prefix there fires `_settings_defaults` instead of `{$prefix}_settings_defaults`.
46+
`Settings::$prefix` must be initialized where it is declared, not only in the constructor. The static methods are reachable on the frontend, where the `Settings` object is never instantiated, and a null prefix there fires `_settings_defaults` instead of `{$prefix}_settings_defaults`.
4747

4848
## Verifying the invariant
4949

0 commit comments

Comments
 (0)