Skip to content

Commit efa1168

Browse files
committed
Label WordPress versions with their release code names
Show each WordPress release's jazz-musician shorthand next to its number in the Site Settings version picker (e.g. "6.9 (Gene)", "4.9 (Tipton)"). Labels without a matching release — trunk, beta, and pre-release majors — stay unchanged. The mapping uses the single-word shorthand each release's announcement URL on wordpress.org/news carries (first name, last name, or nickname, depending on the release).
1 parent 8a9a294 commit efa1168

2 files changed

Lines changed: 75 additions & 2 deletions

File tree

‎packages/playground/website/src/components/site-manager/site-settings-form/unconnected-site-settings-form.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
isOlderWordPressVersion,
1414
OlderWordPressVersions,
1515
} from './older-wordpress-versions';
16+
import { formatWordPressVersionLabel } from './wordpress-release-names';
1617

1718
type ConfigurableFields = Record<
1819
keyof SiteFormData & ('wpVersion' | 'language' | 'multisite'),
@@ -119,7 +120,9 @@ export function UnconnectedSiteSettingsForm({
119120
const wpVersionOptions = useMemo(() => {
120121
const modernOptions = Object.keys(supportedWPVersions || {}).map(
121122
(version) => ({
122-
label: `${supportedWPVersions[version]}`,
123+
label: formatWordPressVersionLabel(
124+
`${supportedWPVersions[version]}`
125+
),
123126
value: version,
124127
})
125128
);
@@ -146,7 +149,7 @@ export function UnconnectedSiteSettingsForm({
146149
disabled: true,
147150
},
148151
...OlderWordPressVersions.map((version) => ({
149-
label: version,
152+
label: formatWordPressVersionLabel(version),
150153
value: version,
151154
})),
152155
];
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/**
2+
* Release code names for WordPress versions, taken from the shorthand
3+
* each release's announcement URL uses on wordpress.org/news (e.g.
4+
* `/news/2025/12/gene/` → "Gene" for 6.9). The full jazz-musician names
5+
* are listed at https://wordpress.org/about/history/.
6+
*/
7+
export const WordPressReleaseNames: Record<string, string> = {
8+
'1.0': 'Miles',
9+
'1.2': 'Mingus',
10+
'1.5': 'Strayhorn',
11+
'2.0': 'Duke',
12+
'2.1': 'Ella',
13+
'2.2': 'Getz',
14+
'2.3': 'Dexter',
15+
'2.5': 'Brecker',
16+
'2.6': 'Tyner',
17+
'2.7': 'Coltrane',
18+
'2.8': 'Baker',
19+
'2.9': 'Carmen',
20+
'3.0': 'Thelonious',
21+
'3.1': 'Reinhardt',
22+
'3.2': 'Gershwin',
23+
'3.3': 'Sonny',
24+
'3.4': 'Green',
25+
'3.5': 'Elvin',
26+
'3.6': 'Oscar',
27+
'3.7': 'Basie',
28+
'3.8': 'Parker',
29+
'3.9': 'Smith',
30+
'4.0': 'Benny',
31+
'4.1': 'Dinah',
32+
'4.2': 'Powell',
33+
'4.3': 'Billie',
34+
'4.4': 'Clifford',
35+
'4.5': 'Coleman',
36+
'4.6': 'Pepper',
37+
'4.7': 'Vaughan',
38+
'4.8': 'Evans',
39+
'4.9': 'Tipton',
40+
'5.0': 'Bebo',
41+
'5.1': 'Betty',
42+
'5.2': 'Jaco',
43+
'5.3': 'Kirk',
44+
'5.4': 'Adderley',
45+
'5.5': 'Eckstine',
46+
'5.6': 'Simone',
47+
'5.7': 'Esperanza',
48+
'5.8': 'Tatum',
49+
'5.9': 'Joséphine',
50+
'6.0': 'Arturo',
51+
'6.1': 'Misha',
52+
'6.2': 'Dolphy',
53+
'6.3': 'Lionel',
54+
'6.4': 'Shirley',
55+
'6.5': 'Regina',
56+
'6.6': 'Dorsey',
57+
'6.7': 'Rollins',
58+
'6.8': 'Cecil',
59+
'6.9': 'Gene',
60+
};
61+
62+
/**
63+
* Decorates a WordPress version label with its release code name when
64+
* one is known, e.g. "6.9" → "6.9 (Gene)". Labels that don't map to a
65+
* released version (trunk, beta, unreleased majors) are returned as-is.
66+
*/
67+
export function formatWordPressVersionLabel(label: string): string {
68+
const name = WordPressReleaseNames[label];
69+
return name ? `${label} (${name})` : label;
70+
}

0 commit comments

Comments
 (0)