Skip to content

Commit 5a8cc80

Browse files
authored
Merge branch 'trunk' into patch-63518
2 parents a680d9c + 5ac61f4 commit 5a8cc80

91 files changed

Lines changed: 3974 additions & 1737 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/install-testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ jobs:
101101
- db-version: '9.4'
102102
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
103103
- php: '7.2'
104-
db-version: '9.5'
104+
db-version: '9.6'
105105
- php: '7.3'
106-
db-version: '9.5'
106+
db-version: '9.6'
107107

108108
services:
109109
database:

.github/workflows/phpunit-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,17 +203,17 @@ jobs:
203203
os: [ ubuntu-24.04 ]
204204
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
205205
db-type: [ 'mysql', 'mariadb' ]
206-
db-version: [ '9.5', '12.0' ]
206+
db-version: [ '9.6', '12.1' ]
207207
multisite: [ false, true ]
208208
memcached: [ false ]
209209
db-innovation: [ true ]
210210

211211
exclude:
212212
# Exclude version combinations that don't exist.
213213
- db-type: 'mariadb'
214-
db-version: '9.5'
214+
db-version: '9.6'
215215
- db-type: 'mysql'
216-
db-version: '12.0'
216+
db-version: '12.1'
217217
with:
218218
os: ${{ matrix.os }}
219219
php: ${{ matrix.php }}

.github/workflows/reusable-phpunit-tests-v3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
phpunit-tests:
121121
name: ${{ ( inputs.phpunit-test-groups || inputs.coverage-report ) && format( 'PHP {0} with ', inputs.php ) || '' }} ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.db-innovation && ' (innovation release)' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
122122
runs-on: ${{ inputs.os }}
123-
timeout-minutes: ${{ inputs.coverage-report && 120 || 40 }}
123+
timeout-minutes: ${{ inputs.coverage-report && 120 || inputs.php == '8.4' && 30 || 20 }}
124124
permissions:
125125
contents: read
126126

.github/workflows/upgrade-testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
os: [ 'ubuntu-24.04' ]
7171
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
7272
db-type: [ 'mysql' ]
73-
db-version: [ '5.7', '8.0', '8.4', '9.5' ]
73+
db-version: [ '5.7', '8.0', '8.4', '9.6' ]
7474
wp: [ '6.7', '6.8' ]
7575
multisite: [ false, true ]
7676
with:
@@ -179,7 +179,7 @@ jobs:
179179
os: [ 'ubuntu-24.04' ]
180180
php: [ '7.4' ]
181181
db-type: [ 'mysql' ]
182-
db-version: [ '5.7', '8.0', '8.4', '9.5' ]
182+
db-version: [ '5.7', '8.0', '8.4', '9.6' ]
183183
wp: [ '4.7' ]
184184
multisite: [ false, true ]
185185
with:

.version-support-mysql.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"7-0": [
3+
"9.6",
34
"9.5",
45
"9.4",
56
"9.3",

Gruntfile.js

Lines changed: 138 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ module.exports = function(grunt) {
5353
webpackFiles = [
5454
'wp-includes/assets/*',
5555
'wp-includes/css/dist',
56-
'wp-includes/blocks/**/*.css',
5756
'!wp-includes/assets/script-loader-packages.min.php',
5857
'!wp-includes/assets/script-modules-packages.min.php',
5958
],
@@ -588,7 +587,108 @@ module.exports = function(grunt) {
588587
certificates: {
589588
src: 'vendor/composer/ca-bundle/res/cacert.pem',
590589
dest: SOURCE_DIR + 'wp-includes/certificates/ca-bundle.crt'
591-
}
590+
},
591+
// Gutenberg PHP infrastructure files (routes.php, pages.php, constants.php, pages/, routes/).
592+
'gutenberg-php': {
593+
options: {
594+
process: function( content ) {
595+
// Fix boot module asset file path for Core's different directory structure.
596+
return content.replace(
597+
/__DIR__\s*\.\s*(['"])\/..\/\..\/modules\/boot\/index\.min\.asset\.php\1/g,
598+
'ABSPATH . WPINC . \'/js/dist/script-modules/boot/index.min.asset.php\''
599+
);
600+
}
601+
},
602+
files: [ {
603+
expand: true,
604+
cwd: 'gutenberg/build',
605+
src: [
606+
'routes.php',
607+
'pages.php',
608+
'constants.php',
609+
'pages/**/*.php',
610+
'routes/**/*.php',
611+
],
612+
dest: WORKING_DIR + 'wp-includes/build/',
613+
} ],
614+
},
615+
'gutenberg-js': {
616+
files: [ {
617+
expand: true,
618+
cwd: 'gutenberg/build',
619+
src: [
620+
'pages/**/*.js',
621+
'routes/**/*.js',
622+
],
623+
dest: WORKING_DIR + 'wp-includes/build/',
624+
} ],
625+
},
626+
'gutenberg-modules': {
627+
files: [ {
628+
expand: true,
629+
cwd: 'gutenberg/build/modules',
630+
src: [ '**/*', '!**/*.map' ],
631+
dest: WORKING_DIR + 'wp-includes/js/dist/script-modules/',
632+
} ],
633+
},
634+
'gutenberg-styles': {
635+
files: [ {
636+
expand: true,
637+
cwd: 'gutenberg/build/styles',
638+
src: [ '**/*', '!**/*.map' ],
639+
dest: WORKING_DIR + 'wp-includes/css/dist/',
640+
} ],
641+
},
642+
'gutenberg-theme-json': {
643+
options: {
644+
process: function( content, srcpath ) {
645+
// Replace the local schema URL with the canonical public URL for Core.
646+
if ( path.basename( srcpath ) === 'theme.json' ) {
647+
return content.replace(
648+
'"$schema": "../schemas/json/theme.json"',
649+
'"$schema": "https://schemas.wp.org/trunk/theme.json"'
650+
);
651+
}
652+
return content;
653+
}
654+
},
655+
files: [
656+
{
657+
src: 'gutenberg/lib/theme.json',
658+
dest: WORKING_DIR + 'wp-includes/theme.json',
659+
},
660+
{
661+
src: 'gutenberg/lib/theme-i18n.json',
662+
dest: WORKING_DIR + 'wp-includes/theme-i18n.json',
663+
},
664+
],
665+
},
666+
'gutenberg-icons': {
667+
options: {
668+
process: function( content, srcpath ) {
669+
// Remove the 'gutenberg' text domain from _x() calls in manifest.php.
670+
if ( path.basename( srcpath ) === 'manifest.php' ) {
671+
return content.replace(
672+
/_x\(\s*([^,]+),\s*([^,]+),\s*['"]gutenberg['"]\s*\)/g,
673+
'_x( $1, $2 )'
674+
);
675+
}
676+
return content;
677+
}
678+
},
679+
files: [
680+
{
681+
src: 'gutenberg/packages/icons/src/manifest.php',
682+
dest: WORKING_DIR + 'wp-includes/icons/manifest.php',
683+
},
684+
{
685+
expand: true,
686+
cwd: 'gutenberg/packages/icons/src/library',
687+
src: '*.svg',
688+
dest: WORKING_DIR + 'wp-includes/icons/library/',
689+
},
690+
],
691+
},
592692
},
593693
sass: {
594694
colors: {
@@ -1323,20 +1423,21 @@ module.exports = function(grunt) {
13231423
},
13241424
{
13251425
expand: true,
1326-
flatten: true,
1327-
src: [
1328-
BUILD_DIR + 'wp-includes/js/dist/block-editor.js',
1329-
BUILD_DIR + 'wp-includes/js/dist/commands.js',
1330-
],
1331-
dest: BUILD_DIR + 'wp-includes/js/dist/'
1426+
cwd: BUILD_DIR + 'wp-includes/js/dist/',
1427+
src: [ '*.js' ],
1428+
dest: BUILD_DIR + 'wp-includes/js/dist/',
13321429
},
13331430
{
13341431
expand: true,
1335-
flatten: true,
1336-
src: [
1337-
BUILD_DIR + 'wp-includes/js/dist/vendor/**/*.js'
1338-
],
1339-
dest: BUILD_DIR + 'wp-includes/js/dist/vendor/'
1432+
cwd: BUILD_DIR + 'wp-includes/js/dist/vendor/',
1433+
src: [ '**/*.js' ],
1434+
dest: BUILD_DIR + 'wp-includes/js/dist/vendor/',
1435+
},
1436+
{
1437+
expand: true,
1438+
cwd: BUILD_DIR + 'wp-includes/js/dist/script-modules/',
1439+
src: [ '**/*.js' ],
1440+
dest: BUILD_DIR + 'wp-includes/js/dist/script-modules/',
13401441
}
13411442
]
13421443
}
@@ -1475,45 +1576,38 @@ module.exports = function(grunt) {
14751576
} );
14761577

14771578
// Gutenberg integration tasks.
1478-
grunt.registerTask( 'gutenberg-checkout', 'Checks out the Gutenberg repository.', function() {
1579+
grunt.registerTask( 'gutenberg:verify', 'Verifies the installed Gutenberg version matches the expected SHA.', function() {
14791580
const done = this.async();
14801581
grunt.util.spawn( {
14811582
cmd: 'node',
1482-
args: [ 'tools/gutenberg/checkout-gutenberg.js' ],
1583+
args: [ 'tools/gutenberg/utils.js' ],
14831584
opts: { stdio: 'inherit' }
14841585
}, function( error ) {
14851586
done( ! error );
14861587
} );
14871588
} );
14881589

1489-
grunt.registerTask( 'gutenberg-build', 'Builds the Gutenberg repository.', function() {
1590+
grunt.registerTask( 'gutenberg:download', 'Downloads the built Gutenberg artifact.', function() {
14901591
const done = this.async();
1592+
const args = [ 'tools/gutenberg/download.js' ];
1593+
if ( grunt.option( 'force' ) ) {
1594+
args.push( '--force' );
1595+
}
14911596
grunt.util.spawn( {
14921597
cmd: 'node',
1493-
args: [ 'tools/gutenberg/build-gutenberg.js' ],
1598+
args,
14941599
opts: { stdio: 'inherit' }
14951600
}, function( error ) {
14961601
done( ! error );
14971602
} );
14981603
} );
14991604

1500-
grunt.registerTask( 'gutenberg-copy', 'Copies Gutenberg build output to WordPress Core.', function() {
1605+
grunt.registerTask( 'gutenberg:copy', 'Copies Gutenberg JS packages and block assets to WordPress Core.', function() {
15011606
const done = this.async();
15021607
const buildDir = grunt.option( 'dev' ) ? 'src' : 'build';
15031608
grunt.util.spawn( {
15041609
cmd: 'node',
1505-
args: [ 'tools/gutenberg/copy-gutenberg-build.js', `--build-dir=${ buildDir }` ],
1506-
opts: { stdio: 'inherit' }
1507-
}, function( error ) {
1508-
done( ! error );
1509-
} );
1510-
} );
1511-
1512-
grunt.registerTask( 'gutenberg-sync', 'Syncs Gutenberg checkout and build if ref has changed.', function() {
1513-
const done = this.async();
1514-
grunt.util.spawn( {
1515-
cmd: 'node',
1516-
args: [ 'tools/gutenberg/sync-gutenberg.js' ],
1610+
args: [ 'tools/gutenberg/copy.js', `--build-dir=${ buildDir }` ],
15171611
opts: { stdio: 'inherit' }
15181612
}, function( error ) {
15191613
done( ! error );
@@ -1956,26 +2050,36 @@ module.exports = function(grunt) {
19562050
} );
19572051
} );
19582052

2053+
grunt.registerTask( 'build:gutenberg', [
2054+
'copy:gutenberg-php',
2055+
'copy:gutenberg-js',
2056+
'gutenberg:copy',
2057+
'copy:gutenberg-modules',
2058+
'copy:gutenberg-styles',
2059+
'copy:gutenberg-theme-json',
2060+
'copy:gutenberg-icons',
2061+
] );
2062+
19592063
grunt.registerTask( 'build', function() {
19602064
if ( grunt.option( 'dev' ) ) {
19612065
grunt.task.run( [
2066+
'gutenberg:verify',
19622067
'build:js',
19632068
'build:css',
19642069
'build:codemirror',
1965-
'gutenberg-sync',
1966-
'gutenberg-copy',
2070+
'build:gutenberg',
19672071
'copy-vendor-scripts',
19682072
'build:certificates'
19692073
] );
19702074
} else {
19712075
grunt.task.run( [
2076+
'gutenberg:verify',
19722077
'build:certificates',
19732078
'build:files',
19742079
'build:js',
19752080
'build:css',
19762081
'build:codemirror',
1977-
'gutenberg-sync',
1978-
'gutenberg-copy',
2082+
'build:gutenberg',
19792083
'copy-vendor-scripts',
19802084
'replace:source-maps',
19812085
'verify:build'

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"url": "https://develop.svn.wordpress.org/trunk"
88
},
99
"gutenberg": {
10-
"ref": "f4d8a5803aa2fbe26e7d9af4d17e80a622b7bab8"
10+
"sha": "8c78d87453509661a9f28f978ba2c242d515563b",
11+
"ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build"
1112
},
1213
"engines": {
1314
"node": ">=20.10.0",
@@ -111,9 +112,10 @@
111112
"wicg-inert": "3.1.3"
112113
},
113114
"scripts": {
114-
"postinstall": "npm run gutenberg:sync && npm run gutenberg:copy -- --dev",
115+
"postinstall": "npm run gutenberg:download",
115116
"build": "grunt build",
116117
"build:dev": "grunt build --dev",
118+
"build:gutenberg": "grunt build:gutenberg",
117119
"dev": "grunt watch --dev",
118120
"test": "grunt test",
119121
"watch": "grunt watch",
@@ -137,12 +139,10 @@
137139
"test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js",
138140
"test:visual": "wp-scripts test-playwright --config tests/visual-regression/playwright.config.js",
139141
"typecheck:php": "node ./tools/local-env/scripts/docker.js run --rm php composer phpstan",
140-
"gutenberg:checkout": "node tools/gutenberg/checkout-gutenberg.js",
141-
"gutenberg:build": "node tools/gutenberg/build-gutenberg.js",
142-
"gutenberg:copy": "node tools/gutenberg/copy-gutenberg-build.js",
143-
"gutenberg:sync": "node tools/gutenberg/sync-gutenberg.js",
142+
"gutenberg:copy": "node tools/gutenberg/copy.js",
143+
"gutenberg:download": "node tools/gutenberg/download.js",
144144
"vendor:copy": "node tools/vendors/copy-vendors.js",
145145
"sync-gutenberg-packages": "grunt sync-gutenberg-packages",
146146
"postsync-gutenberg-packages": "grunt wp-packages:sync-stable-blocks && grunt build --dev && grunt build"
147147
}
148-
}
148+
}

src/js/_enqueues/wp/util.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ window.wp = window.wp || {};
3636
};
3737

3838
return function ( data ) {
39-
if ( ! document.getElementById( 'tmpl-' + id ) ) {
39+
var el = document.querySelector( 'script#tmpl-' + id );
40+
if ( ! el ) {
4041
throw new Error( 'Template not found: ' + '#tmpl-' + id );
4142
}
42-
compiled = compiled || _.template( $( '#tmpl-' + id ).html(), options );
43+
compiled = compiled || _.template( $( el ).html(), options );
4344
return compiled( data );
4445
};
4546
});

src/wp-admin/css/colors/_admin.scss

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,27 +88,12 @@ input[type="checkbox"]:checked {
8888
border-color: var(--wp-admin-theme-color);
8989
}
9090

91-
input[type=checkbox]:checked::before {
92-
content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27#{url-friendly-colour(variables.$form-checked)}%27%2F%3E%3C%2Fsvg%3E");
93-
content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27#{url-friendly-colour(variables.$form-checked)}%27%2F%3E%3C%2Fsvg%3E") / '';
94-
}
95-
96-
// Checkbox checkmark - white for visibility on theme color background
97-
input[type="checkbox"]:checked::before {
98-
content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E") / '';
99-
}
100-
10191
// Radio checked state - uses theme color
10292
input[type="radio"]:checked {
10393
background: var(--wp-admin-theme-color);
10494
border-color: var(--wp-admin-theme-color);
10595
}
10696

107-
// Radio dot - white for visibility on theme color background
108-
input[type="radio"]:checked::before {
109-
background: tokens.$white;
110-
}
111-
11297
.wp-core-ui input[type="reset"]:hover,
11398
.wp-core-ui input[type="reset"]:active {
11499
color: variables.$link-focus;

0 commit comments

Comments
 (0)