Skip to content

Commit c4f1de3

Browse files
committed
Coding Standards: Align inline comments with WP documentation style.
Follow-up to [65103] feedback. Adjust the multi-line `/* */` comments added for the DOMContentLoaded deferral so they match the WordPress PHP inline-documentation conventions: no DocBlock-style summary-then-blank separator (that structure is reserved for `/** */`), and use the short `See #65103.` form for Trac references instead of `See Trac #65103.` to match usages throughout core (`See #38883`, `See #40146`, etc.). See #65103. Made-with: Cursor
1 parent 484acd5 commit c4f1de3

File tree

4 files changed

+20
-24
lines changed

4 files changed

+20
-24
lines changed

src/wp-includes/build/pages/font-library/page-wp-admin.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,13 @@ function wp_font_library_wp_admin_enqueue_scripts( $hook_suffix ) {
155155

156156
/*
157157
* Add inline script to initialize the app using initSinglePage (no menuItems).
158-
*
159-
* The call is deferred until DOMContentLoaded so that all classic script
160-
* dependencies of @wordpress/boot (wp-private-apis, wp-components, wp-theme,
161-
* etc.) have finished parsing and executing before the dynamic module import
162-
* resolves. Without this, a modulepreloaded @wordpress/boot can win the race
158+
* The dynamic import is deferred until DOMContentLoaded so that all classic
159+
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
160+
* wp-theme, etc.) have finished parsing and executing before the boot module
161+
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
163162
* against the classic-script-printing pass on fast CDN-fronted hosts in
164163
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
165-
* "Cannot unlock an undefined object". See Trac #65103.
164+
* "Cannot unlock an undefined object". See #65103.
166165
*/
167166
wp_add_inline_script(
168167
'font-library-wp-admin-prerequisites',

src/wp-includes/build/pages/font-library/page.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,13 @@ function wp_font_library_render_page() {
161161

162162
/*
163163
* Add inline script to initialize the app.
164-
*
165-
* The call is deferred until DOMContentLoaded so that all classic script
166-
* dependencies of @wordpress/boot (wp-private-apis, wp-components, wp-theme,
167-
* etc.) have finished parsing and executing before the dynamic module import
168-
* resolves. Without this, a modulepreloaded @wordpress/boot can win the race
164+
* The dynamic import is deferred until DOMContentLoaded so that all classic
165+
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
166+
* wp-theme, etc.) have finished parsing and executing before the boot module
167+
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
169168
* against the classic-script-printing pass on fast CDN-fronted hosts in
170169
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
171-
* "Cannot unlock an undefined object". See Trac #65103.
170+
* "Cannot unlock an undefined object". See #65103.
172171
*/
173172
$init_modules = [];
174173
wp_add_inline_script(

src/wp-includes/build/pages/options-connectors/page-wp-admin.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,13 @@ function wp_options_connectors_wp_admin_enqueue_scripts( $hook_suffix ) {
155155

156156
/*
157157
* Add inline script to initialize the app using initSinglePage (no menuItems).
158-
*
159-
* The call is deferred until DOMContentLoaded so that all classic script
160-
* dependencies of @wordpress/boot (wp-private-apis, wp-components, wp-theme,
161-
* etc.) have finished parsing and executing before the dynamic module import
162-
* resolves. Without this, a modulepreloaded @wordpress/boot can win the race
158+
* The dynamic import is deferred until DOMContentLoaded so that all classic
159+
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
160+
* wp-theme, etc.) have finished parsing and executing before the boot module
161+
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
163162
* against the classic-script-printing pass on fast CDN-fronted hosts in
164163
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
165-
* "Cannot unlock an undefined object". See Trac #65103.
164+
* "Cannot unlock an undefined object". See #65103.
166165
*/
167166
wp_add_inline_script(
168167
'options-connectors-wp-admin-prerequisites',

src/wp-includes/build/pages/options-connectors/page.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,13 @@ function wp_options_connectors_render_page() {
161161

162162
/*
163163
* Add inline script to initialize the app.
164-
*
165-
* The call is deferred until DOMContentLoaded so that all classic script
166-
* dependencies of @wordpress/boot (wp-private-apis, wp-components, wp-theme,
167-
* etc.) have finished parsing and executing before the dynamic module import
168-
* resolves. Without this, a modulepreloaded @wordpress/boot can win the race
164+
* The dynamic import is deferred until DOMContentLoaded so that all classic
165+
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
166+
* wp-theme, etc.) have finished parsing and executing before the boot module
167+
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
169168
* against the classic-script-printing pass on fast CDN-fronted hosts in
170169
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
171-
* "Cannot unlock an undefined object". See Trac #65103.
170+
* "Cannot unlock an undefined object". See #65103.
172171
*/
173172
$init_modules = [];
174173
wp_add_inline_script(

0 commit comments

Comments
 (0)