For the complete documentation index, see llms.txt. This page is also available as Markdown.

porter_block_patterns_path

Filters the directory containing a configured pattern's PHP content file.

add_filter( 'porter_block_patterns_path', function ( string $directory, string $pattern_name ) : string {
    return get_stylesheet_directory() . '/patterns/source';
}, 10, 2 );

The default is porter/inc/block/patterns. Porter appends /{sanitized-pattern-name}.php after the filter runs.

Last updated