> For the complete documentation index, see [llms.txt](https://whoisandywhite.gitbook.io/porterwp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whoisandywhite.gitbook.io/porterwp/developer-api/hooks/porter_public_scripts_default_args.md). Agents can also search and read this documentation through its [MCP server](https://whoisandywhite.gitbook.io/porterwp/~gitbook/mcp).

# porter\_public\_scripts\_default\_args

Filters defaults merged into each script in `settings.public.scripts`.

```php
add_filter( 'porter_public_scripts_default_args', function ( array $defaults ) : array {
    $defaults['args']['strategy'] = 'defer';
    return $defaults;
} );
```

Defaults: empty `src`, no dependencies, the active theme version, and `args.in_footer => true`. Individual asset configuration takes precedence. Script-tag attributes belong in that asset's `data` map, not in this defaults array.
