Skip to content

wp-build: Move the site data preload into wp-build-polyfills - #54460

Merged
LiamSarsfield merged 20 commits into
trunkfrom
fm/jp3476-patch-note-upstream-link
Nov 24, 2026
Merged

LiamSarsfield merged 20 commits into
trunkfrom
fm/jp3476-patch-note-upstream-link

Conversation

@LiamSarsfield

@LiamSarsfield LiamSarsfield commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Fixes JETPACK-3506

Proposed changes

Move the WordPress 7.1 site-data preload from the @wordpress/build patch into wp-build-polyfills. Each page passes its build prefix and page slug to register(), which constructs its preload filter. Ignore malformed page entries. The page argument needs @wordpress/build 0.26.0 or later.

Loaders now pass null as the third argument, which leaves the version threshold unchanged, and Jetpack passes JETPACK__MINIMUM_WP_VERSION.

Why are these changes being made?

WordPress 7.1 requests a different site-data field list from the build template. Supplying page configuration lets any plugin use the preload; existing three-argument calls keep working. The upstream change does not change the field list.

It ships in the first Jetpack release after 16.4 with no switch. Simple gets it through mu-wpcom; self-hosted and Atomic sites through the applicable plugins. WordPress 7.0 keeps its current live request. Monetize's preload also waits for its off-by-default flag.

Related product discussion/links

Upstream change

Does this pull request change what data or activity we track or use?

No.

Testing instructions

Checked 19 Docker pages in Chrome on 7.0/7.1 at earlier commits, not Monetize or wpcom-my-jetpack; no real Simple or Atomic runtime.

No unit test runs the page settings the loaders now pass to register(). The Chrome check above covers them.

  1. On 7.1, open My Jetpack, Newsletter, Boost, Jetpack Settings and, with the jetpack-monetize-dashboard flag on, Monetize. Reload with Network open; expect zero root /?_fields= REST requests.
  2. On 7.0, expect one request before and after applying this change.
  3. On a 7.1 test site, omit the fourth argument in Newsletter's load_wp_build() and reload: expect one request. Restore it and expect zero.

@LiamSarsfield
LiamSarsfield requested a review from a team as a code owner November 3, 2026 10:31
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the fm/jp3476-patch-note-upstream-link branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fm/jp3476-patch-note-upstream-link
bin/jetpack-downloader test jetpack-mu-wpcom-plugin fm/jp3476-patch-note-upstream-link

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions Bot added [Package] Wp Build Polyfills [Tests] Includes Tests Actions GitHub actions used to automate some of the work around releases and repository management Docs labels Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: December 8, 2026
    • Code freeze: December 7, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Boost plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Nov 3, 2026
@LiamSarsfield
LiamSarsfield marked this pull request as draft November 3, 2026 10:32
@LiamSarsfield LiamSarsfield changed the title refactor: move site-data preload into wp-build-polyfills wp-build: Move WordPress 7.1 preloads into shared polyfills Nov 3, 2026
@jp-launch-control

jp-launch-control Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 19 files. Only the first 5 are listed here.

File Coverage Δ% Δ Uncovered
projects/packages/activity-log/src/class-jetpack-activity-log.php 95/147 (64.63%) -3.23% 7 💔
projects/packages/backup/src/class-jetpack-backup.php 479/573 (83.60%) -1.03% 7 💔
projects/packages/jetpack-mu-wpcom/src/common/class-wpcom-wp-build-page.php 63/91 (69.23%) -5.77% 7 💔
projects/packages/jetpack-mu-wpcom/src/features/ai-launchpad/ai-launchpad.php 10/122 (8.20%) -0.50% 7 💔
projects/packages/newsletter/src/class-settings.php 181/287 (63.07%) -1.58% 7 💔

Full summary · PHP report · JS report

Coverage check overridden by Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code .

*
* @var string[]
*/
private const PRELOAD_FILTERS = array(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Monetize page in #54433 isn't in this list, so whichever of the two merges second needs jetpack_monetize_jetpack_monetize_dashboard_wp_admin_preload_paths added here or the new lint fails. If both go green before either merges, trunk's lint fails until someone adds it.

}
self::$hooked = true;

foreach ( self::PRELOAD_FILTERS as $filter ) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ties the 7.1 preload to register(), and Forms only calls register() on its own page, so a host that loads the Forms build through jetpack_forms_load_wp_build now goes without the preload too. That host already skipped register() before this change, and no host in this repo opts in.

self::$hooked = true;

foreach ( self::PRELOAD_FILTERS as $filter ) {
add_filter( $filter, array( __CLASS__, 'add_site_data_preload' ) );

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These names match the {{PREFIX}}_{{PAGE_SLUG_UNDERSCORE}}_wp_admin_preload_paths filter in the @wordpress/build 0.26.0 wp-admin template. The template applies it from admin_enqueue_scripts, so it runs after register() has added these.

* @param array $paths REST API paths to preload.
* @return array REST API paths to preload.
*/
public static function add_site_data_preload( $paths ) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pages built from the new patch get the 7.1 preload only from this method, so an older polyfills copy winning the autoloader, like during a mixed deploy, costs those pages one live site-data request. Every plugin that ships those pages also ships this version, so I'm fine with that.

*/
public static function add_site_data_preload( $paths ) {
// WordPress 7.1's core-data requests this list; removing it adds a live request on those sites.
// https://github.com/WordPress/gutenberg/pull/86185 lets pages survive a failed request without changing the list.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WordPress/gutenberg#86185 is still open. It stops a failed site-data request from taking the page down and leaves the field list alone, so this path is still needed after it lands.

public static function add_site_data_preload( $paths ) {
// WordPress 7.1's core-data requests this list; removing it adds a live request on those sites.
// https://github.com/WordPress/gutenberg/pull/86185 lets pages survive a failed request without changing the list.
$path = '/?_fields=description,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front';

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path is preloaded on every WordPress version, same as the old patch did, even though only 7.1's bundled core-data asks for it. Every other setup carries one unused preload.

// WordPress 7.1's core-data requests this list; removing it adds a live request on those sites.
// https://github.com/WordPress/gutenberg/pull/86185 lets pages survive a failed request without changing the list.
$path = '/?_fields=description,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front';
if ( ! in_array( $path, $paths, true ) ) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If another callback on these filters returns something other than an array, in_array() fails here. The template's own array_reduce() would break on that too, and nothing in this repo hooks these filters besides this class.

// https://github.com/WordPress/gutenberg/pull/86185 lets pages survive a failed request without changing the list.
$path = '/?_fields=description,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front';
if ( ! in_array( $path, $paths, true ) ) {
$paths[] = $path;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appends the 7.1 path at the end, where the old patch put it second. Preloaded responses are matched by path, so the order makes no difference.

Comment thread .github/files/lint-project-structure.sh Outdated
EXIT=1
echo "::error file=$FILE::Wp-build page filter \`$FILTER\` is missing from PRELOAD_FILTERS. Add it to \`$WP_BUILD_PRELOAD_FILE\`."
done < <( jq -r --argjson filters "$WP_BUILD_PRELOAD_FILTERS" '
.wpPlugin as $plugin | $plugin.pages[]? |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a package.json has a malformed pages entry, jq errors on it and skips the rest of that file's pages without failing the check. Every entry today is a string or an object with an id, so I'm leaving that for now.

Comment thread .github/files/lint-project-structure.sh Outdated
.wpPlugin as $plugin | $plugin.pages[]? |
(if type == "string" then . else .id end) as $page |
((($plugin.name // "gutenberg") + "_" + $page | gsub("-"; "_")) + "_wp_admin_preload_paths") as $filter |
select($filters | index($filter) | not) |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only checks that each page's filter is in the list, so a removed or renamed page leaves a stale name in PRELOAD_FILTERS. That costs one unused add_filter(), so I didn't add the reverse check.

/**
* Each wp-build page preloads the WordPress 7.1 site record without duplicates.
*/
public function test_site_data_preload_keeps_the_upstream_path_first_on_every_page() {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put this test first in the class, above the properties and set_up(). No sniff checks member order, so I've left it there.

$expected = $paths;
$expected[] = '/?_fields=description,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front';

WP_Build_Polyfills::register( 'first-page', array() );

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tear_down() doesn't remove the 20 filters this adds, so they stay hooked for the later tests. No other test applies them, so I've left it.

$expected[] = '/?_fields=description,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front';

WP_Build_Polyfills::register( 'first-page', array() );
WP_Build_Polyfills::register( 'second-page', array() );

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This second call returns early because $hooked is already set, so it never adds the filters a second time. It shows that a second page on the same request still leaves one copy of the path in each list.

WP_Build_Polyfills::register( 'first-page', array() );
WP_Build_Polyfills::register( 'second-page', array() );

foreach ( $pages as $page ) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first failing page stops this loop, and the assertion message names its filter, so I kept one loop rather than a data provider.

$preload_paths = array(
'/?_fields=description,generate_animated_image_subsizes,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
+ // WordPress 7.1's bundled core-data requests this list, without generate_animated_image_subsizes.
+ '/?_fields=description,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The standalone page.php template loses the 7.1 preload with this, and it has no filter to add it back. No page in this repo is served through page.php, so only an outside host opening a bare page id such as ?page=jetpack-forms-responses with that build loaded would make the extra request.

@LiamSarsfield
LiamSarsfield marked this pull request as ready for review November 3, 2026 12:11

@xavier-lc xavier-lc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the filter names against the 0.26.0 template and every register() caller. I also ran the new lint block on this head: it passes, and fails on seo/package.json once that entry is removed from the list. Two small things inline.

Comment on lines +22 to +42
$pages = array(
'jetpack_activity_log_jetpack_activity_log_dashboard',
'jetpack_backup_jetpack_backup_dashboard',
'jetpack_boost_jetpack_boost_dashboard',
'jetpack_forms_jetpack_forms_responses',
'jetpack_mu_wpcom_site_setup',
'jetpack_mu_wpcom_wpcom_backup',
'jetpack_mu_wpcom_wpcom_scan',
'jetpack_my_jetpack_my_jetpack_dashboard',
'jetpack_newsletter_jetpack_newsletter_dashboard',
'jetpack_plugin_jetpack_ai_hub',
'jetpack_plugin_jetpack_settings_dashboard',
'jetpack_podcast_jetpack_podcast_dashboard',
'jetpack_protect_jetpack_protect_dashboard',
'jetpack_scan_jetpack_scan',
'jetpack_search_jetpack_search_dashboard',
'jetpack_seo_jetpack_seo_dashboard',
'jetpack_sharing_likes_jetpack_sharing_settings',
'jetpack_social_jetpack_social_dashboard',
'jetpack_videopress_jetpack_videopress_dashboard',
'jpa_jetpack_premium_analytics',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test could read PRELOAD_FILTERS through reflection, as the lint does, instead of repeating the 20 names. It would still check that each listed filter is hooked, dedupes and keeps the upstream path first, and adding or renaming a page would mean one edit instead of two.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, done in c1d859b. The test now reads PRELOAD_FILTERS through reflection, so adding or renaming a page is one edit.

Comment thread .github/files/lint-project-structure.sh Outdated
[[ "$WP_BUILD_PRELOAD_FILTERS" == \[* ]] || { echo "::error file=$WP_BUILD_PRELOAD_FILE::Unable to read PRELOAD_FILTERS from $WP_BUILD_PRELOAD_FILE."; exit 1; }
while IFS=$'\t' read -r FILE FILTER; do
EXIT=1
echo "::error file=$FILE::Wp-build page filter \`$FILTER\` is missing from PRELOAD_FILTERS. Add it to \`$WP_BUILD_PRELOAD_FILE\`."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "Wp-build page filter" should be "wp-build page filter", the casing used everywhere else.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c1d859b, thanks.

@LiamSarsfield
LiamSarsfield force-pushed the fm/jp3476-patch-note-upstream-link branch from 0b93446 to c1d859b Compare November 3, 2026 13:54
\Automattic\Jetpack\WP_Build_Polyfills\WP_Build_Polyfills::MODULE_IDS
),
'7.0',
array(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No unit test runs the page settings that this and the other loaders now pass to register(), so I'm leaving the coverage check red. The preload on all 20 pages was checked in a browser on WordPress 7.1 and 7.0, and the 20 filter names match the old PRELOAD_FILTERS list exactly.

array(
array(
'prefix' => 'jetpack_scan',
'slug' => self::PAGE_SLUG,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self::PAGE_SLUG is Scan's menu slug, and jetpack-scan is also its wpPlugin.pages id, so it works as the page slug here. Three hard-coded jetpack_scan_jetpack_scan_* function names already depend on that id, so splitting the two would mean changing them too.

@LiamSarsfield
LiamSarsfield marked this pull request as ready for review November 4, 2026 10:37

@xavier-lc xavier-lc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers. Two small things here, two inline.

  • The description's "Remove the central page list and its project-structure lint check" describes something added and removed within this branch. It was never on trunk and the net diff doesn't touch .github/, so that sentence can go.
  • "Code coverage requirement" is the only failing check. The reason for leaving it red is sound, but it's only in an inline comment. Please add the Covered by non-unit tests label and put the reason in the description.

Checked at this head:

  • All 20 prefix/slug pairs match wpPlugin and the 0.26.0 wp_admin_preload_paths filter. The two register() calls left unchanged (Newsletter legacy, Publicize editor) don't serve wp-build pages.
  • Current trunk has the same wp-build pages and register() caller files as this branch.
  • An older polyfills copy ignores the extra argument, so the worst case is one extra request, not a fatal.

I didn't run the tests locally, and Simple and Atomic remain untested.

if ( ! is_array( $page ) || ! isset( $page['slug'] ) || ! is_string( $page['slug'] ) || '' === $page['slug'] ) {
continue;
}
add_filter( self::page_filter( $page, 'wp_admin_preload_paths' ), array( __CLASS__, 'add_site_data_preload' ) );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#54433 adds jetpack-monetize-dashboard and calls register() with two arguments, so once both PRs merge that page makes one live site-data request on 7.1. The patch used to cover new pages automatically, and nothing flags the omission now. Whichever PR merges second should pass '7.0' and array( array( 'prefix' => 'jetpack_monetize', 'slug' => 'jetpack-monetize-dashboard' ) ).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks! Agreed, the second one to land will add '7.0' and the monetize page settings.

@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Pass wp-build page configuration to the polyfills package.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move-site-data-preload-polyfill already holds the real entry, and "Pass wp-build page configuration to the polyfills package" doesn't make sense inside this package. This file can be deleted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted in 61390cf, thanks!

@LiamSarsfield LiamSarsfield added the Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code label Nov 4, 2026
xavier-lc
xavier-lc previously approved these changes Nov 4, 2026

@xavier-lc xavier-lc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

WP_Build_Polyfills::SCRIPT_HANDLES,
WP_Build_Polyfills::MODULE_IDS
),
'7.0',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling all these might be missed in the next version of #51370. There's nothing to indicate this "7.0" is a WordPress version number.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. The third argument now defaults to null, which leaves the shared threshold alone, so the package loaders pass null and carry no version at all. The only default left is the one in wp-build-polyfills, done in 5ab44ed.

'jetpack',
array_merge( WP_Build_Polyfills::SCRIPT_HANDLES, WP_Build_Polyfills::MODULE_IDS )
array_merge( WP_Build_Polyfills::SCRIPT_HANDLES, WP_Build_Polyfills::MODULE_IDS ),
'7.0',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this?

Suggested change
'7.0',
JETPACK__MINIMUM_WP_VERSION,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 5ab44ed, thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small follow-up on this one. WordPress.com Simple loads this file for the Jetpack AI page without jetpack.php, so the constant can be undefined there and that page would hit a fatal error. In 5f756d3 it's passed when it's defined and null otherwise, so your suggestion still applies everywhere the plugin's main file runs. I also merged trunk in the same push.

Callers pass null to keep the package default threshold; the Jetpack plugin passes its minimum WordPress version constant.
…-upstream-link

# Conflicts:
#	pnpm-lock.yaml
@LiamSarsfield LiamSarsfield changed the title wp-build: Move the site data preload into wp-build-polyfills refactor: move wp-build site-data preloading into PHP polyfills Nov 5, 2026
@LiamSarsfield LiamSarsfield changed the title refactor: move wp-build site-data preloading into PHP polyfills wp-build: Move the site data preload into wp-build-polyfills Nov 5, 2026
…yfills

On WordPress 7.1, this lets the Monetize dashboard preload its site data instead of requesting it live.
…issing

WordPress.com loads the Jetpack AI page through jetpack-mu-wpcom without the
plugin's main file, so JETPACK__MINIMUM_WP_VERSION can be undefined there.
Pass null in that case, which leaves the polyfills' version threshold alone.

Use the $page_id argument for the page slug: load() only records the page id
when it aliases the screen ID, so the property is not set when a page is
loaded without the alias.
@LiamSarsfield
LiamSarsfield merged commit 04ab903 into trunk Nov 24, 2026
134 checks passed
@LiamSarsfield
LiamSarsfield deleted the fm/jp3476-patch-note-upstream-link branch November 24, 2026 15:08
@github-actions github-actions Bot removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Actions GitHub actions used to automate some of the work around releases and repository management Admin Page React-powered dashboard under the Jetpack menu Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Docs [Feature] Contact Form [Feature] Publicize Now Jetpack Social, auto-sharing [mu wpcom Feature] Ai Launchpad [Package] Activity Log [Package] Backup [Package] Forms [Package] Jetpack mu wpcom WordPress.com Features [Package] Monetize [Package] My Jetpack [Package] Newsletter [Package] Podcast [Package] Premium Analytics [Package] Protect [Package] Publicize [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] Seo [Package] Sharing Likes [Package] VideoPress [Package] Wp Build Polyfills [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants