Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Add replacement for addLayout to the acf:upgrade command
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x committed Aug 12, 2024
1 parent b94dec3 commit a5eb943
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Console/UpgradeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function handle()
'public function enqueue($block = [])' => 'public function assets(array $block): void',
'public function enqueue()' => 'public function assets(array $block): void',
'/->addFields\(\$this->get\((.*?)\)\)/' => fn ($match) => "->addPartial({$match[1]})",
'/->addLayout\(\$this->get\((.*?)\)\)/' => fn ($match) => "->addLayout({$match[1]})",
];

$this->components->info('Checking for outdated <fg=blue>ACF Composer</> classes...');
Expand Down

0 comments on commit a5eb943

Please sign in to comment.