Skip to content

Commit 3d3ca3a

Browse files
committed
Merge branch 'trunk' into pr/10237
2 parents d3390ad + 49d1ded commit 3d3ca3a

Some content is hidden

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

60 files changed

+9885
-1271
lines changed

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,28 @@ updates:
129129
- "underscore"
130130

131131
# Monitor npm dependencies within default themes.
132+
- package-ecosystem: "npm"
133+
directory: "/src/wp-content/themes/twentytwentyfive"
134+
schedule:
135+
interval: "weekly"
136+
open-pull-requests-limit: 20
137+
groups:
138+
twentytwentyfive-css:
139+
patterns:
140+
- "**browserslist*"
141+
- "*css*"
142+
143+
- package-ecosystem: "npm"
144+
directory: "/src/wp-content/themes/twentytwentytwo"
145+
schedule:
146+
interval: "weekly"
147+
open-pull-requests-limit: 20
148+
groups:
149+
twentytwentytwo-css:
150+
patterns:
151+
- "**browserslist*"
152+
- "*css*"
153+
132154
- package-ecosystem: "npm"
133155
directory: "/src/wp-content/themes/twentytwentyone"
134156
schedule:

.github/workflows/test-and-zip-default-themes.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414
- 'src/wp-content/themes/twentynineteen/**'
1515
- 'src/wp-content/themes/twentytwenty/**'
1616
- 'src/wp-content/themes/twentytwentyone/**'
17+
- 'src/wp-content/themes/twentytwentytwo/**'
18+
- 'src/wp-content/themes/twentytwentyfive/**'
1719
# Changes to this workflow file should always verify success.
1820
- '.github/workflows/test-and-zip-default-themes.yml'
1921
pull_request:
@@ -29,6 +31,8 @@ on:
2931
- 'src/wp-content/themes/twentynineteen/**'
3032
- 'src/wp-content/themes/twentytwenty/**'
3133
- 'src/wp-content/themes/twentytwentyone/**'
34+
- 'src/wp-content/themes/twentytwentytwo/**'
35+
- 'src/wp-content/themes/twentytwentyfive/**'
3236
# Changes to this workflow file should always verify success.
3337
- '.github/workflows/test-and-zip-default-themes.yml'
3438
workflow_dispatch:
@@ -120,6 +124,8 @@ jobs:
120124
fail-fast: false
121125
matrix:
122126
theme: [
127+
'twentytwentyfive',
128+
'twentytwentytwo',
123129
'twentytwentyone',
124130
'twentytwenty',
125131
'twentynineteen',
@@ -221,11 +227,31 @@ jobs:
221227
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
222228
persist-credentials: false
223229

230+
- name: Set up Node.js for themes needing minification
231+
if: matrix.theme == 'twentytwentytwo' || matrix.theme == 'twentytwentyfive'
232+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
233+
with:
234+
node-version-file: '.nvmrc'
235+
cache: npm
236+
cache-dependency-path: src/wp-content/themes/${{ matrix.theme }}/package-lock.json
237+
238+
- name: Install npm dependencies
239+
if: matrix.theme == 'twentytwentytwo' || matrix.theme == 'twentytwentyfive'
240+
run: npm ci
241+
working-directory: src/wp-content/themes/${{ matrix.theme }}
242+
243+
- name: Build theme assets
244+
if: matrix.theme == 'twentytwentytwo' || matrix.theme == 'twentytwentyfive'
245+
run: npm run build
246+
working-directory: src/wp-content/themes/${{ matrix.theme }}
247+
224248
- name: Upload theme ZIP as an artifact
225249
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
226250
with:
227251
name: ${{ matrix.theme }}
228-
path: src/wp-content/themes/${{ matrix.theme }}
252+
path: |
253+
src/wp-content/themes/${{ matrix.theme }}
254+
!src/wp-content/themes/${{ matrix.theme }}/node_modules
229255
if-no-files-found: error
230256
include-hidden-files: true
231257

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ wp-tests-config.php
8888
/src/wp-content/themes/twentynineteen/node_modules
8989
/src/wp-content/themes/twentytwentyone/node_modules
9090
/src/wp-content/themes/twentytwenty/node_modules
91+
/src/wp-content/themes/twentytwentytwo/node_modules
92+
/src/wp-content/themes/twentytwentyfive/node_modules
93+
94+
# Minified files in bundled themes
95+
/src/wp-content/themes/twentytwentytwo/*.min.css
96+
/src/wp-content/themes/twentytwentyfive/*.min.css
9197

9298
# Operating system specific files
9399
.DS_Store

Gruntfile.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,16 @@ module.exports = function(grunt) {
567567
src: [
568568
'wp-admin/css/colors/*/*.css'
569569
]
570+
},
571+
themes: {
572+
expand: true,
573+
cwd: WORKING_DIR,
574+
dest: WORKING_DIR,
575+
ext: '.min.css',
576+
src: [
577+
'wp-content/themes/twentytwentytwo/style.css',
578+
'wp-content/themes/twentytwentyfive/style.css',
579+
]
570580
}
571581
},
572582
rtlcss: {
@@ -1591,6 +1601,7 @@ module.exports = function(grunt) {
15911601
'rtl',
15921602
'cssmin:rtl',
15931603
'cssmin:colors',
1604+
'cssmin:themes',
15941605
'usebanner'
15951606
] );
15961607

phpcs.xml.dist

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
#############################################################################
230230
SELECTIVE EXCLUSIONS
231231
Exclude specific files for specific sniffs and/or exclude sub-groups in sniffs.
232-
232+
233233
These exclusions are listed ordered by alphabetic sniff name.
234234
#############################################################################
235235
-->
@@ -266,8 +266,9 @@
266266

267267
<!-- Goto is an effective way to handle errors in decoders which expect valid bytes
268268
without impacting the fast path while avoiding bloating the code with redundant
269-
and risky handling code. Exclude forbidding goto in UTF-8 fallback code. -->
269+
and risky handling code. Exclude forbidding goto in parser code. -->
270270
<exclude-pattern>/wp-includes/compat-utf8\.php</exclude-pattern>
271+
<exclude-pattern>/wp-includes/class-wp-block-processor\.php</exclude-pattern>
271272
</rule>
272273

273274
<!-- Exclude sample config from modernization to prevent breaking CI workflows based on WP-CLI scaffold.

0 commit comments

Comments
 (0)