> 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_block_folders.md). Agents can also search and read this documentation through its [MCP server](https://whoisandywhite.gitbook.io/porterwp/~gitbook/mcp).

# porter\_block\_folders

Filters the subdirectories Porter scans below the configured block root.

```php
add_filter( 'porter_block_folders', function ( array $folders ) : array {
    return [ 'components', 'layouts', 'query-blocks' ];
} );
```

The default is an empty array, which scans the block root itself. When the array is populated, only the listed directories are scanned; the root is not added automatically. Return paths relative to the block root.
