| @@ -42,9 +42,9 @@ | ||
| 42 | 42 | * '1.0.0', |
| 43 | 43 | * true |
| 44 | 44 | * ); |
| 45 | 45 | * wp_enqueue_script( 'my-plugin-window-actions' ); |
| 46 | - * } ); | |
| 46 | + * }, 5 ); // Before the shell harvests the payload at priority 10. | |
| 47 | 47 | * openstation_register_window_action_script( 'my-plugin-window-actions' ); |
| 48 | 48 | * ``` |
| 49 | 49 | * |
| 50 | 50 | * For live unregistration on deactivation, the plugin's JS should set |
| @@ -147,8 +147,11 @@ | ||
| 147 | 147 | 'scriptBefore' => $payload['before'], |
| 148 | 148 | 'scriptAfter' => $payload['after'], |
| 149 | 149 | 'scriptL10n' => $payload['l10n'], |
| 150 | 150 | 'scriptTranslations' => $payload['translations'], |
| 151 | + // The handle's dependency closure, replayed before the bundle | |
| 152 | + // on its lazy load — see `openstation_resolve_script_dependencies()`. | |
| 153 | + 'scriptDeps' => openstation_resolve_script_dependencies( $handle ), | |
| 151 | 154 | ); |
| 152 | 155 | $seen[ $handle ] = true; |
| 153 | 156 | } |
| 154 | 157 | return $out; |