Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
4118d80
HTTP API: Add `wp_remote_request_multiple()` for concurrent requests.
swissspidy Sep 22, 2026
077ed59
HTTP API: Address PHPStan findings in `WP_Http::request_multiple()`.
swissspidy Sep 22, 2026
40803fc
HTTP API: Return a null `pre_http_request` value as is.
swissspidy Sep 22, 2026
791ab10
Merge branch 'trunk' into trac-37459-http-request-multiple
swissspidy Sep 25, 2026
b9fbfe5
HTTP API: Reference `WP_Http::request_multiple()` with `{@see}` in th…
swissspidy Sep 25, 2026
000e9a1
HTTP API: Type the batch request API for static analysis.
swissspidy Sep 25, 2026
bc7a505
Merge branch 'trunk' into trac-37459-http-request-multiple
swissspidy Sep 28, 2026
b880f2c
Merge branch 'trunk' into trac-37459-http-request-multiple
swissspidy Oct 7, 2026
cd697a0
Privacy: Add a check for post status in `wp_privacy_send_personal_dat…
t-hamano Nov 17, 2026
2726d2e
Networks and Sites: Return a 404 from `ms-files.php` when no file is …
SergeyBiryukov Nov 17, 2026
adf9a87
Build/Test Tools: Update `@types/node` to version 24.19.2.
desrosj Nov 17, 2026
f7135c8
Menus: Fix wp_get_nav_menu_items() dropping items when the term count…
audrasjb Nov 17, 2026
f14c157
Build/Test Tools: Update Sass to 1.108.2.
desrosj Nov 17, 2026
24c3400
Build/Test Tools: Update `@napi-rs/image` to version 1.16.0.
desrosj Nov 17, 2026
705791b
Build/Test Tools: Update npm `devDependencies`.
desrosj Nov 17, 2026
d5c0b77
WordPress 7.2 RC 1.
audrasjb Nov 17, 2026
ce78d2d
Post WordPress 7.2-RC1 version bump.
dream-encode Nov 17, 2026
0bab8d2
HTML API: Refactor `excerpt_remove_footnotes()`.
dmsnell Nov 17, 2026
54489a8
Tests: Remove redundant post-status fixture cleanup.
lancewillett Nov 17, 2026
3a7166e
Tests: Use the attachment factory for uploaded fixtures.
lancewillett Nov 17, 2026
ffebecc
Tests: Make page-list data providers static.
lancewillett Nov 17, 2026
b458e07
Tests: Share admin locators across E2E tests.
lancewillett Nov 17, 2026
e06adad
Merge branch 'trunk' into trac-37459-http-request-multiple
claude Nov 17, 2026
f15403f
HTTP API: Fix PHPStan return type errors in WP_Http::prepare_request().
claude Nov 17, 2026
567ce64
Tests: Remove empty REST icons test placeholders.
lancewillett Nov 17, 2026
19379c8
Build/Test Tools: Include PHPStan baselines via a PHP loader.
westonruter Nov 17, 2026
050bdaf
REST API: Return no terms when a term search resolves to no taxonomy.
johnbillion Nov 18, 2026
a891337
Customize: Sanitize option settings with sanitize_option() when previ…
johnbillion Nov 18, 2026
45c4c45
REST API: Escape a hyphen in `wp_is_json_media_type()`.
johnbillion Nov 18, 2026
1b7a7bc
REST API: Harden comment author handling.
johnbillion Nov 18, 2026
0e5a0ee
XML-RPC: Only return comments the user can read from `wp.getComments`.
johnbillion Nov 18, 2026
cc42ef4
Embeds: Return scripts from the oEmbed proxy only for embed handlers.
johnbillion Nov 18, 2026
e9acd04
Shortcodes: Prevent attribute escape sequences from forming HTML.
johnbillion Nov 18, 2026
0ed3c9e
Meta API: Validate the `relation` argument in `WP_Meta_Query`.
johnbillion Nov 18, 2026
75aab48
Customize: Harden nav menu args handling.
johnbillion Nov 18, 2026
1fdfb39
Query: Use prepared statements for more `WP_Query` clauses.
johnbillion Nov 18, 2026
ba9a93c
REST API: Only serve `rest_route` requests outside of the admin.
johnbillion Nov 18, 2026
86d0d8a
Comments: Check permissions before moving a comment to another post i…
johnbillion Nov 18, 2026
c2ee32b
XML-RPC: Process only one pingback per request.
johnbillion Nov 18, 2026
6b74030
Interactivity API: Escape the store namespace in `wp_interactivity_da…
johnbillion Nov 18, 2026
750136d
REST API: Restrict post and template author assignment to site members.
johnbillion Nov 18, 2026
ca8e4ca
Tests: Update the expected error for an invalid comment author.
johnbillion Nov 18, 2026
f276d60
General: Bump the pinned hash for Gutenberg to `efd7722`.
johnbillion Nov 18, 2026
a2c6459
WordPress 7.2 RC 2.
johnbillion Nov 18, 2026
bb6f370
Post WordPress 7.2-RC2 version bump.
johnbillion Nov 18, 2026
bf090db
HTTP API: Address review feedback on concurrent requests.
claude Nov 18, 2026
689cb33
Tests: Cover `wp_strict_cross_origin_referrer()`.
SergeyBiryukov Nov 18, 2026
7bc0de1
HTTP API: Address further review feedback on concurrent requests.
claude Nov 18, 2026
a21fd67
Build/Test Tools: Hold a project subset to PHPStan rule level 10.
westonruter Nov 18, 2026
96c60f0
Build/Test Tools: Run the mu-plugin E2E specs in parallel.
lancewillett Nov 18, 2026
12824a9
Tests: Avoid attachment ID collisions in media widget tests.
lancewillett Nov 19, 2026
ba75b6e
Build/Test Tools: Check where tracked CSS and JavaScript files live.
lancewillett Nov 19, 2026
2162cd6
Docs: Remove repeated word within `WP_Error` property.
desrosj Nov 19, 2026
6883e50
Docs: Correct the indentation of closing braces in hash notation.
johnbillion Nov 19, 2026
c27ffa2
Build/Test Tools: Split the PHPStan reusable workflow into -v1 and -v2.
desrosj Nov 19, 2026
fa05da8
External Libraries: Use the classic build of jQuery Form.
desrosj Nov 19, 2026
accd2d4
Tests: Cover `rsd_link()`.
SergeyBiryukov Nov 19, 2026
97f5bdf
Upgrade/Install: Update the `$_old_files` array for 7.2.
peterwilsoncc Nov 19, 2026
0f2e26a
Build/Test Tools: Share the release ZIP across test jobs.
lancewillett Nov 20, 2026
3faf586
Build/Test Tools: Run plugin management E2E tests in parallel.
lancewillett Nov 20, 2026
a5c41fa
Abilities API: Declare the `uri` format for the `link` output of `cor…
jorgefilipecosta Nov 20, 2026
5e0ad66
Editor: Validate the entity in the entity fields reads and REST route.
jorgefilipecosta Nov 20, 2026
93d10b0
Abilities API: Reject empty slugs and usernames in `core/users-query`.
jorgefilipecosta Nov 20, 2026
860be52
Tests: Isolate rewrite state in term link and redirect tests.
lancewillett Nov 20, 2026
d20a2fb
Tests: Load the menu quick search helper in test setup.
lancewillett Nov 20, 2026
a4a0272
Tests: Isolate theme, script module, and post password fixtures.
lancewillett Nov 20, 2026
f7c912e
Tests: Reconnect the database helper after disconnect tests.
lancewillett Nov 20, 2026
809c013
Build/Test Tools: Type-check three more JavaScript files.
lancewillett Nov 20, 2026
1f84b51
Administration: Revert the On This Day section of the Activity widget.
peterwilsoncc Nov 20, 2026
2b8adf7
Tests: Cover `esc_url_raw()`.
SergeyBiryukov Nov 20, 2026
cb7c390
Tests: Cover `format_for_editor()`.
SergeyBiryukov Nov 21, 2026
4038eb0
Tests: Delete the network created by the network option cache tests.
lancewillett Nov 22, 2026
78d8b11
Tests: Isolate script module registration in the entity action tests.
lancewillett Nov 22, 2026
2fcad86
Tests: Isolate stylesheet assertions in embed and Customizer tests.
lancewillett Nov 22, 2026
9fb84f4
Tests: Cover `user_can_richedit()`.
SergeyBiryukov Nov 22, 2026
9d7b7c2
Abilities API: Reject input that sanitization makes invalid
gziolo Nov 23, 2026
d09b315
Application Passwords: Send the created notification in the user's lo…
johnbillion Nov 23, 2026
89cc209
Tests: Reset the script queue after Customizer manager tests.
lancewillett Nov 23, 2026
13c2209
Build/Test Tools: Run theme management E2E tests in parallel.
lancewillett Nov 23, 2026
3d4146d
Build/Test Tools: Run the trash end-to-end tests in parallel.
lancewillett Nov 23, 2026
8d1741e
Mail: Guard against line feeds in untrusted header sources.
dmsnell Nov 23, 2026
9669668
Tests: Restore theme features after image header tests.
lancewillett Nov 23, 2026
f668959
Tests: Log out after creating privileged class fixtures.
lancewillett Nov 23, 2026
1ccce21
Tests: Cover `wp_default_editor()`.
SergeyBiryukov Nov 23, 2026
5ae0af9
Media: Create image sizes that share dimensions on upload.
adamsilverstein Nov 23, 2026
9f134f6
Editor: Restore the default block editor styles.
peterwilsoncc Nov 24, 2026
14f13cb
Comments: Tighten note and reaction rules in all handlers.
adamsilverstein Nov 24, 2026
91b5036
General: Bump the pinned hash for Gutenberg to `c5bdc7f`.
Mamaduka Nov 24, 2026
649b316
Abilities API: Read the schema default in `core/settings-get`.
jorgefilipecosta Nov 24, 2026
9f62d93
Help/About: Update the About page for 7.2.
t-hamano Nov 24, 2026
d0ba880
Tests: Keep the oEmbed suite running without SimpleXML.
lancewillett Nov 24, 2026
2d7fd1e
Tests: Allow hosts to opt out of HTTP loopback fixtures.
lancewillett Nov 24, 2026
bc37c94
WordPress 7.2 RC 3.
audrasjb Nov 24, 2026
119ed74
Tests: Simplify post type cleanup.
lancewillett Nov 24, 2026
ef06eef
Post WordPress 7.2 RC 3 version bump.
audrasjb Nov 24, 2026
546a35a
Revert [65758].
audrasjb Nov 24, 2026
084145c
Post WordPress 7.2 RC 3 version bump.
audrasjb Nov 24, 2026
0f60ced
Tests: Remove redundant taxonomy cleanup.
lancewillett Nov 24, 2026
e9b0cd3
Build/Test Tools: Post-branching updates for trunk.
johnbillion Nov 24, 2026
7824ab0
Build/Test Tools: Show individual end-to-end test names in CI.
lancewillett Nov 24, 2026
b412a3a
Tests: Cover `wp_heartbeat_settings()`.
SergeyBiryukov Nov 24, 2026
5cb65d8
Build/Test Tools: Update PHPStan to 2.3.7.
westonruter Nov 25, 2026
2da24ad
Code Quality: Call `process_blocks_custom_css()` statically.
westonruter Nov 25, 2026
635c42c
Code Quality: Correct by-ref types in UTF-8 compat functions.
westonruter Nov 25, 2026
916de6f
Editor: Update the post editor preload paths for the DataForm inspector.
ntsekouras Nov 25, 2026
fa31aae
Code Quality: Resolve the `deadCode.unreachable` PHPStan errors.
westonruter Nov 25, 2026
967cbe9
I18N: Place translator comments directly before their strings.
swissspidy Nov 25, 2026
9fedd3c
Bundled Themes: Place translator comments directly before their strings.
swissspidy Nov 25, 2026
00a656a
Code Quality: Add PHPStan integer ranges and literal types.
swissspidy Nov 25, 2026
31b09c2
Code Quality: Add PHPStan array shapes.
swissspidy Nov 25, 2026
cf37b95
Merge remote-tracking branch 'upstream/trunk' into pr-work
swissspidy Nov 25, 2026
d622142
HTTP API: Do not resend batched requests when a batch fails.
swissspidy Nov 25, 2026
c591e4f
Merge pull request #98 from swissspidy/claude/relaxed-sagan-wvvj44
swissspidy Nov 25, 2026
e9e15c7
Build/Test Tools: Filter E2E lists to test-owned rows.
lancewillett Nov 25, 2026
ffbf93d
Tests: Clear the theme JSON cache before each theme test using `WP_Th…
lancewillett Nov 25, 2026
20f9614
Editor: Keep the entity fields registry immutable when its init actio…
ntsekouras Nov 25, 2026
4293f64
Code Quality: Fix the `$args` types of `wp_get_recent_posts()`.
westonruter Nov 25, 2026
520a06a
Tests: Clear the Customizer manager between tests.
lancewillett Nov 25, 2026
1cdb7c3
Themes: Test the empty theme feature registry fallback.
lancewillett Nov 25, 2026
c339583
Themes: Test header video player selection.
lancewillett Nov 25, 2026
6674eea
Themes: Test registering and removing default headers.
lancewillett Nov 25, 2026
0f1f20a
Code Quality: Resolve the notIdentical.alwaysTrue PHPStan errors.
westonruter Nov 25, 2026
b67aa85
Code Quality: Resolve the empty.variable PHPStan errors.
westonruter Nov 25, 2026
1734d10
Revisions: Bound comparisons when rendering large diffs.
lancewillett Nov 25, 2026
5601a21
Code Quality: Correct the type of `WP_Theme::$update`.
westonruter Nov 25, 2026
f470162
Code Quality: Resolve the identical.alwaysFalse PHPStan errors.
westonruter Nov 25, 2026
0b9eda5
HTTP API: Narrow PHPStan types for concurrent requests.
swissspidy Nov 25, 2026
a786491
Tests: Cover `allowed_tags()`.
SergeyBiryukov Nov 25, 2026
80d2e42
Code Quality: Resolve the `varTag.noVariable` PHPStan errors.
westonruter Nov 25, 2026
abe7dd3
Tests: Restore widget registries after widget tests.
lancewillett Nov 25, 2026
7a5c889
Tests: Restore the rewrite object after rewrite tag tests.
lancewillett Nov 25, 2026
cd4fa0d
Help/About: Optimize about page header images.
peterwilsoncc Nov 26, 2026
90582b1
Editor: Add PHP helpers for block support classes and styles.
aaronrobertshaw Nov 26, 2026
c048d9f
Media: Add spacing below filter labels in the media modal.
t-hamano Nov 26, 2026
71d71e5
Widgets: Introduce `wp_delete_inactive_widgets()`.
t-hamano Nov 26, 2026
893d922
Twenty Twenty-One: Keep button text visible on custom backgrounds.
t-hamano Nov 26, 2026
9f0201d
Editor: Count numbers in the classic editor word count.
t-hamano Nov 26, 2026
f608a2c
I18N: Read both revision date header names in `.l10n.php` files.
swissspidy Nov 26, 2026
a4ad96e
Tests: Cover `_navigation_markup()`.
SergeyBiryukov Nov 26, 2026
d4a16ac
Themes: Check that a JSON file is readable before decoding it.
t-hamano Nov 27, 2026
d450653
I18N: Add context to the Filter button in list tables.
t-hamano Nov 27, 2026
c4b144d
Build/Test Tools: Add tests for the PHPStan extensions.
westonruter Nov 27, 2026
174722c
Tests: Cover `wptexturize_primes()`.
SergeyBiryukov Nov 27, 2026
6540c36
Build/Test Tools: Document where to keep a WSL checkout.
lancewillett Nov 28, 2026
67bf7a5
Tests: Clear the unloaded markers for the two translation fixture dom…
lancewillett Nov 28, 2026
b37ad2c
Tests: Preserve block style variations in multisite revision fixtures.
lancewillett Nov 28, 2026
f10e114
Tests: Reset the entity action registry before each entity action test.
lancewillett Nov 28, 2026
78d8e29
Tests: Restore the active theme after template REST requests.
lancewillett Nov 28, 2026
da001e8
Tests: Remove duplicate post type and taxonomy cleanup from five test…
lancewillett Nov 28, 2026
5567bcc
Tests: Fix invalid JSON in the non-Latin block theme fixture.
lancewillett Nov 28, 2026
979a5e7
Tests: Initialize the script registries for the core entity field mod…
lancewillett Nov 28, 2026
298ae13
Build/Test Tools: Generate a changed-file list for release tags.
lancewillett Nov 28, 2026
43413fc
Tests: Add opt-in checks for core abilities with live AI providers.
lancewillett Nov 28, 2026
f3a4930
Tests: Cover `wp_rel_callback()`.
SergeyBiryukov Nov 28, 2026
515916f
Tests: Avoid retrying expected HTTP redirect errors.
lancewillett Nov 29, 2026
0d9fde8
Build/Test Tools: Type-check the asynchronous password-strength loader.
lancewillett Nov 29, 2026
b853d48
Tests: Cover `translate_smiley()`.
SergeyBiryukov Nov 29, 2026
125b5b5
Abilities API: Return `core/content-query` dates at the Unix epoch.
jorgefilipecosta Nov 30, 2026
3f71d43
Tests: Make the note and reaction data providers static.
lancewillett Nov 30, 2026
d3efc0b
Build/Test Tools: Add TypeScript checking for `password-toggle.js`.
lancewillett Nov 30, 2026
f06f375
REST API: Limit the `show_on_front` and `start_of_week` settings to t…
jorgefilipecosta Nov 30, 2026
2499f33
Networks and Sites: Correctly close the site attributes fieldset.
JJJ Nov 30, 2026
365b563
Code Quality: Resolve the `property.defaultValue` PHPStan errors.
westonruter Nov 30, 2026
e05c223
Permalinks: Fix shortlink warning when the post is missing.
westonruter Nov 30, 2026
70a3c51
Build/Test Tools: Enable TypeScript checking for `api-request.js`.
lancewillett Nov 30, 2026
bdfb6dc
Tests: Make the REST settings controller data providers static.
lancewillett Nov 30, 2026
1f970ea
Tests: Remove redundant taxonomy cleanup from `wp_insert_term()` tests.
lancewillett Nov 30, 2026
772ca36
Tests: Fix stale `$wp_query` reference in shortlink test.
westonruter Nov 30, 2026
455f616
Tests: Cover `wp_dependencies_unique_hosts()`.
SergeyBiryukov Nov 30, 2026
e2214ff
Code Quality: Resolve the `method.unused` PHPStan errors.
westonruter Dec 1, 2026
5033521
Bundled Themes: Update Ipsum for 7.2 RC 4.
peterwilsoncc Dec 1, 2026
3e89744
Help/About: Update the 7.2 About page feature image cache busting str…
peterwilsoncc Dec 1, 2026
8c464b2
General: Bump the pinned hash for Gutenberg to `423bdf3`.
peterwilsoncc Dec 1, 2026
a9849e4
Upgrade/Install: Keep the translation update selection after asking f…
audrasjb Dec 1, 2026
b8631aa
Tests: Cover private field visibility in `core/users-query`
gziolo Dec 1, 2026
f2f9bd2
Upgrade/Install: Remove the `translation_updates` query arg after the…
audrasjb Dec 1, 2026
0c00432
Upgrade/Install: Count each translation update in the update counts.
audrasjb Dec 1, 2026
a67d83b
Build/Test Tools: Run installation and upgrade smoke checks on multis…
lancewillett Dec 1, 2026
ee34d00
Tests: Rename three admin test classes for the methods they cover.
lancewillett Dec 1, 2026
2eded45
Build/Test Tools: Type-check the featured image AJAX handler.
lancewillett Dec 1, 2026
8756122
Build/Test Tools: Test saving Reading Settings and discouraging searc…
lancewillett Dec 1, 2026
e8705d4
Tests: Cover `add_thickbox()`.
SergeyBiryukov Dec 1, 2026
9ce2a1b
Docs: Place `@link` after `@since` and `@deprecated` tags.
t-hamano Dec 2, 2026
1c4ffe2
Administration: Make crowded list tables scroll horizontally.
cbravobernal Dec 2, 2026
c1087c6
HTTP API: Send batched requests like single requests.
swissspidy Dec 2, 2026
a34eda8
Merge remote-tracking branch 'upstream/trunk' into trac-37459-http-re…
swissspidy Dec 2, 2026
3890d2a
HTTP API: Address PHPStan errors in concurrent requests.
swissspidy Dec 2, 2026
64f1daa
HTTP API: Prepare each batched request on its own.
swissspidy Dec 2, 2026
e3abd97
HTTP API: Clarify concurrent request docs and test grouping.
swissspidy Dec 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,19 @@ LOCAL_WP_ENVIRONMENT_TYPE=local
LOCAL_WP_DEVELOPMENT_MODE=core
LOCAL_WP_TESTS_DOMAIN=example.org

##
# API keys and models for the live AI provider tests, which send real requests.
# See `tests/phpunit/manual/wpAiClientLiveProviders.php`.
##
# WP_TESTS_AI_ANTHROPIC_API_KEY=
# WP_TESTS_AI_GOOGLE_API_KEY=
# WP_TESTS_AI_OPENAI_API_KEY=
#
# Model IDs to use instead of the default models, such as `gemini-3.5-flash-lite`.
# WP_TESTS_AI_ANTHROPIC_MODEL=
# WP_TESTS_AI_GOOGLE_MODEL=
# WP_TESTS_AI_OPENAI_MODEL=

##
# This silences the tips output by the dotenv package.
##
Expand Down
1 change: 1 addition & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ paths:
.github/workflows/**/*.yml:
ignore:
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
- 'reusable workflow call "\$/[^"]+" at "uses" is not following the format'
2 changes: 1 addition & 1 deletion .github/actions/smoke-check/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Smoke check a WordPress installation'
description: 'Serves an installed single site with PHP built-in web server and checks that its front end, REST API, and admin respond.'
description: 'Serves an installed single site or network with PHP built-in web server and checks that its front end, REST API, and admin respond.'

inputs:
admin-user:
Expand Down
30 changes: 21 additions & 9 deletions .github/actions/smoke-check/smoke-check.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#!/bin/bash
#
# Smoke checks an installed WordPress single site over HTTP.
# Smoke checks an installed WordPress single site or the main site of a network over HTTP.
#
# Runs from the root of the installation, with WP-CLI available. Multisite is not supported because
# a network's domain lives in wp-config.php and the database, not just an option.
# Runs from the root of the installation, with WP-CLI available. The site must be installed at
# http://localhost/. curl connects to the local server but sends Host: localhost, so a network finds its
# main site and no URL in the database changes. php -S does no rewrites, so subsites are not checked.

set -euo pipefail

: "${RUNNER_TEMP:?}" "${WP_ADMIN_USER:?}" "${WP_ADMIN_PASSWORD:?}"

site_port=8889
site_url="http://127.0.0.1:${site_port}"
site_url='http://localhost'
connect_to="localhost:80:127.0.0.1:${site_port}"
server_log="${RUNNER_TEMP}/server.log"
jar="${RUNNER_TEMP}/cookies.txt"
: > "${jar}"
Expand All @@ -20,9 +22,12 @@ http_code=''

version="$(wp core version)"

# Nothing undoes these, so the site is only good for this check afterwards.
wp option update home "${site_url}"
wp option update siteurl "${site_url}"
# Every request sends Host: localhost, so another install URL would fail later with a vague error.
installed_url="$(wp option get siteurl)"
[ "${installed_url%/}" = "${site_url}" ] \
|| { echo "::error::the site must be installed at ${site_url}/, not ${installed_url}"; exit 1; }

# Nothing undoes these, so cron stays off and external requests stay blocked afterwards.
# A fresh install shows posts here already, but the front page check below needs it.
wp option update show_on_front posts
# Both make requests no check asked for, and the update checks call api.wordpress.org.
Expand All @@ -45,7 +50,8 @@ trap stop_server EXIT
# No connection prints 000 and exits 7, which set -e would take as fatal.
deadline=$(( SECONDS + 30 ))
while :; do
ready_code="$(curl --silent --max-time 5 --output /dev/null --write-out '%{http_code}' "${site_url}/" || true)"
ready_code="$(curl --silent --max-time 5 --output /dev/null --write-out '%{http_code}' \
--connect-to "${connect_to}" "${site_url}/" || true)"
[ "${ready_code}" = '000' ] || break
[ "${SECONDS}" -lt "${deadline}" ] || { echo '::error::the server never answered'; exit 1; }
sleep 1
Expand All @@ -63,7 +69,7 @@ fetch() {
shift
: > "${response}"
curl --silent --show-error --max-time 30 --output "${response}" \
--write-out '%{http_code}' --cookie "${jar}" --cookie-jar "${jar}" \
--write-out '%{http_code}' --cookie "${jar}" --cookie-jar "${jar}" --connect-to "${connect_to}" \
"$@" "${site_url}${path}" > "${code}" || status=$?
http_code="$(cat "${code}")"
[ "${status}" -eq 0 ] || [ "${status}" -eq 22 ] \
Expand Down Expand Up @@ -108,6 +114,12 @@ echo 'ok login'
# The admin bar renders only for a logged-in user.
check '/wp-admin/' 'id="wpadminbar"' '</html>'

if wp core is-installed --network; then
check '/wp-admin/network/' 'id="wpadminbar"' ' network-admin' '</html>'
else
echo 'skip /wp-admin/network/ (not a network)'
fi

# Catches a fatal during shutdown. An empty log would let the grep pass silently.
[ -s "${server_log}" ] || { echo '::error::the server wrote no log'; exit 1; }
if grep -qE 'Fatal error|Uncaught|Segmentation fault' "${server_log}"; then
Expand Down
182 changes: 182 additions & 0 deletions .github/workflows/file-type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
name: File Type Check

on:
push:
branches:
- trunk
- '6.[8-9]'
- '[7-9].[0-9]'
paths:
# Inward check: files added to CSS/JS directories.
- 'src/wp-includes/css/**'
- 'src/wp-includes/js/**'
- 'src/wp-admin/css/**'
- 'src/wp-admin/js/**'
# Outward check: CSS/JS files placed outside designated directories.
- 'src/wp-includes/**.css'
- 'src/wp-includes/**.js'
- 'src/wp-admin/**.css'
- 'src/wp-admin/**.js'
# Confirm any changes to the workflow file itself.
- '.github/workflows/file-type-check.yml'
pull_request:
branches:
- trunk
- '6.[8-9]'
- '[7-9].[0-9]'
paths:
- 'src/wp-includes/css/**'
- 'src/wp-includes/js/**'
- 'src/wp-admin/css/**'
- 'src/wp-admin/js/**'
- 'src/wp-includes/**.css'
- 'src/wp-includes/**.js'
- 'src/wp-admin/**.css'
- 'src/wp-admin/**.js'
- '.github/workflows/file-type-check.yml'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
cancel-in-progress: true

permissions: {}

jobs:
# Verifies that CSS and JS files live in the directories intended for them.
#
# The JS sources in src/js/ are out of scope. The build system decides where
# those are placed, so only its output is checked.
check-file-types:
name: Verify file types in CSS/JS directories
runs-on: ubuntu-26.04
permissions:
contents: read
if: |
github.repository == 'WordPress/wordpress-develop' || (
github.event_name == 'pull_request' && (
! github.event.repository.private ||
! github.event.pull_request.draft ||
contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' )
)
)
timeout-minutes: 5

steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

- name: Check for misplaced CSS and JS files
run: |
# Git does the filtering, so no path is ever matched as text. Shell
# patterns break on names holding a tab, a newline or a quote: Git
# C-quotes those, and core.quotePath=false does not stop it.
#
# Each check is a bare assignment, so `set -e` sees a failure from Git.
#
# Every exclude starts with src/, the directory the positive pathspecs share.
# git ls-files strips that shared directory from every pathspec, excludes
# included, without checking that it is there. An exclude such as *.js is
# then cut down to a pattern that can match every file.
#
# Only tracked files are checked. The PHP that Gutenberg generates
# into css/dist and js/dist is untracked, so it never appears here.
# Whether it should be tracked, moved, or not copied at all is still
# open in #65278. If it becomes tracked, this check will flag it.

# Git exits 0 when a pathspec matches nothing.
if [ -z "$( git ls-files -- src/wp-includes src/wp-admin )" ]; then
echo "::error::No tracked files found under src/wp-includes or src/wp-admin."
exit 1
fi

# The SCSS sources for the admin color schemes are the only tracked
# non-CSS files in these directories.
inward_css=$( git ls-files -- src/wp-includes/css src/wp-admin/css \
':(exclude,glob)src/wp-includes/css/**/*.css' \
':(exclude,glob)src/wp-admin/css/**/*.css' \
':(exclude,glob)src/wp-admin/css/colors/**/*.scss' )

# Both directories are gitignored in full, so this only catches a file
# committed with `git add -f`.
inward_js=$( git ls-files -- src/wp-includes/js src/wp-admin/js \
':(exclude,glob)src/wp-includes/js/**/*.js' \
':(exclude,glob)src/wp-admin/js/**/*.js' )

# src/wp-includes/build/ is tracked, not gitignored: it holds the
# generated routes and pages.
outward=$( git ls-files -- \
':(glob)src/wp-includes/**/*.css' ':(glob)src/wp-includes/**/*.js' \
':(glob)src/wp-admin/**/*.css' ':(glob)src/wp-admin/**/*.js' \
':(exclude,glob)src/wp-includes/css/**' \
':(exclude,glob)src/wp-includes/js/**' \
':(exclude,glob)src/wp-admin/css/**' \
':(exclude,glob)src/wp-admin/js/**' \
':(exclude,glob)src/wp-includes/build/**' )

violations=$( printf '%s\n%s\n%s' "$inward_css" "$inward_js" "$outward" | grep -v '^$' || true )

if [ -n "$violations" ]; then
echo "::error::Misplaced files found."
echo
echo "$violations"
echo
echo "CSS directories should contain only .css files and JS directories only .js files."
echo ".css and .js files belong in those directories, not elsewhere in wp-includes/ or wp-admin/."
echo "If a file is a legitimate exception, update .github/workflows/file-type-check.yml."
exit 1
fi

echo "All tracked CSS and JS files are correctly placed."

slack-notifications:
name: Slack Notifications
uses: ./.github/workflows/slack-notifications.yml
permissions:
actions: read
contents: read
needs: [ check-file-types ]
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
secrets:
SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-26.04
permissions:
actions: write
needs: [ check-file-types, slack-notifications ]
if: |
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_attempt < 2 &&
(
contains( needs.*.result, 'cancelled' ) ||
contains( needs.*.result, 'failure' )
)

steps:
- name: Dispatch workflow run
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
retries: 2
retry-exempt-status-codes: 418
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: `${context.runId}`,
}
});
Loading
Loading