Skip to content

Commit 01be5bf

Browse files
committed
Fix an issue with third-party plugins and What's New admin scripts and styles.
1 parent 02af3b9 commit 01be5bf

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,9 @@ Instructions for popular native integrations are below:
852852

853853
== Changelog ==
854854

855+
= 4.22.0 =
856+
* Fixed an issue where third-party plugins calling WordPress core functions incorrectly could break What's New admin scripts and styles.
857+
855858
= 4.21.0 =
856859
* Added AI-ready security actions via the WordPress Abilities API, enabling automated threat inspection and response.
857860
* Added compatibility with the latest version of the Ninja Forms plugin.

src/php/Admin/WhatsNew.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function init(): void {
8686
*/
8787
private function init_hooks(): void {
8888
add_action( 'kagg_settings_tab', [ $this, 'action_settings_tab' ] );
89-
add_action( 'admin_print_footer_scripts', [ $this, 'enqueue_assets' ] );
89+
add_action( 'admin_print_footer_scripts', [ $this, 'enqueue_assets' ], 9 );
9090
add_action( 'admin_footer', [ $this, 'maybe_show_popup' ] );
9191
add_action( 'wp_ajax_' . self::MARK_SHOWN_ACTION, [ $this, 'mark_shown' ] );
9292
add_filter( 'update_footer', [ $this, 'update_footer' ], 1010 );

tests/php/integration/Admin/WhatsNewTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function test_init_and_init_hooks( bool $wizard_completed ): void {
4040

4141
if ( $wizard_completed ) {
4242
self::assertSame( 10, has_action( 'kagg_settings_tab', [ $subject, 'action_settings_tab' ] ) );
43-
self::assertSame( 10, has_action( 'admin_print_footer_scripts', [ $subject, 'enqueue_assets' ] ) );
43+
self::assertSame( 9, has_action( 'admin_print_footer_scripts', [ $subject, 'enqueue_assets' ] ) );
4444
self::assertSame( 10, has_action( 'admin_footer', [ $subject, 'maybe_show_popup' ] ) );
4545
self::assertSame( 10, has_action( 'wp_ajax_hcaptcha-mark-shown', [ $subject, 'mark_shown' ] ) );
4646
self::assertSame( 1010, has_filter( 'update_footer', [ $subject, 'update_footer' ] ) );

0 commit comments

Comments
 (0)