get_all_registered() as $name => $block) { if (!str_starts_with($name, 'filter-query-block-pro/')) continue; $handles = array_merge($block->editor_script_handles, $block->script_handles, $block->view_script_handles); foreach (array_unique($handles) as $handle) { $script = wp_scripts()->registered[$handle] ?? null; if ($script && in_array('wp-i18n', $script->deps, true)) wp_set_script_translations($handle, FQBPRO_TEXT_DOMAIN, $path); } } } /** * Show build notice when files are missing */ function show_build_notice() { printf( '
%s
pnpm install',
'pnpm run build',
'pnpm start'
)
);
}