Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Register wp-build polyfills so the admin bundle loads on WordPress versions that don't provide the wp-theme script handle
3 changes: 2 additions & 1 deletion projects/packages/activity-log/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"automattic/jetpack-autoloader": "@dev",
"automattic/jetpack-composer-plugin": "@dev",
"automattic/jetpack-connection": "@dev",
"automattic/jetpack-status": "@dev"
"automattic/jetpack-status": "@dev",
"automattic/jetpack-wp-build-polyfills": "@dev"
},
"require-dev": {
"automattic/jetpack-changelogger": "@dev",
Expand Down
16 changes: 16 additions & 0 deletions projects/packages/activity-log/src/class-jetpack-activity-log.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\WP_Build_Polyfills\WP_Build_Polyfills;
use function add_action;
use function add_filter;
use function current_user_can;
Expand Down Expand Up @@ -146,6 +147,21 @@ public static function admin_init() {
}
}

// The admin bundle depends on `@wordpress/*` handles (e.g. `wp-theme`,
// pulled in via `@wordpress/ui`) that Core does not register on older
// WordPress versions. Without them, WP_Scripts silently drops the
// bundle and the page renders as an empty root node. Register the
// polyfills here so this only runs on the Activity Log screen — the
// register() call can force-replace Core handles, so it must stay
// page-scoped rather than firing on every admin request.
WP_Build_Polyfills::register(
'jetpack-activity-log',
array_merge(
WP_Build_Polyfills::SCRIPT_HANDLES,
WP_Build_Polyfills::MODULE_IDS
)
);

add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin_scripts' ) );
}

Expand Down
5 changes: 5 additions & 0 deletions projects/plugins/jetpack/changelog/fix-activity-log-blank
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: Composer lock update


3 changes: 2 additions & 1 deletion projects/plugins/jetpack/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading