$active ) { if ( ! $active || isset( $seen[ $handle ] ) ) { continue; } $payload = openstation_resolve_script_payload( $handle ); if ( '' === $payload['url'] ) { // Loud diagnostic — visible under WP_DEBUG. A typo'd handle, // or a register call made before `wp_register_script()`, // otherwise registers nothing and leaves the author staring // at a ⋯ menu that never grew a row. openstation_warn_unresolvable_script_handle( 'openstation_register_window_action_script', 'Window action', (string) $handle ); continue; } $out[] = array( 'handle' => (string) $handle, 'scriptUrl' => $payload['url'], 'scriptBefore' => $payload['before'], 'scriptAfter' => $payload['after'], 'scriptL10n' => $payload['l10n'], 'scriptTranslations' => $payload['translations'], ); $seen[ $handle ] = true; } return $out; }