Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions inc/class-blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,17 @@ public static function getFacadeAccessor() {
} )::getFacadeAccessor()
);

// Register each path as an anonymous component path with its prefix.
foreach ( $this->paths_to_views as $prefix => $path ) {
// Skip paths without a prefix in the key.
if ( is_numeric( $prefix ) ) {
continue;
}

// Register the anonymous component path.
$this->blade_compiler->anonymousComponentPath( $path, $prefix );
}

// Callback function for every view.
if ( is_callable( $this->view_callback ) ) {
$this->view_factory->composer( '*' , function( $view ) {
Expand Down