| @@ -35,9 +35,9 @@ | ||
| 35 | 35 | * '1.0.0', |
| 36 | 36 | * true |
| 37 | 37 | * ); |
| 38 | 38 | * wp_enqueue_script( 'my-plugin-effects' ); |
| 39 | - * } ); | |
| 39 | + * }, 5 ); // Before the shell harvests the payload at priority 10. | |
| 40 | 40 | * openstation_register_unfocus_effect_script( 'my-plugin-effects' ); |
| 41 | 41 | * ``` |
| 42 | 42 | * |
| 43 | 43 | * For live unregistration on deactivation, the plugin's JS should set |
| @@ -138,8 +138,11 @@ | ||
| 138 | 138 | 'scriptBefore' => $payload['before'], |
| 139 | 139 | 'scriptAfter' => $payload['after'], |
| 140 | 140 | 'scriptL10n' => $payload['l10n'], |
| 141 | 141 | 'scriptTranslations' => $payload['translations'], |
| 142 | + // The handle's dependency closure, replayed before the bundle | |
| 143 | + // on its lazy load — see `openstation_resolve_script_dependencies()`. | |
| 144 | + 'scriptDeps' => openstation_resolve_script_dependencies( $handle ), | |
| 142 | 145 | ); |
| 143 | 146 | $seen[ $handle ] = true; |
| 144 | 147 | } |
| 145 | 148 | return $out; |