@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use ACFComposer\ACFComposer; |
| 4 | 4 | use Flynt\Components; |
| 5 | 5 | |
| 6 | -add_action('Flynt/afterRegisterComponents', function () { |
|
| 6 | +add_action('Flynt/afterRegisterComponents', function() { |
|
| 7 | 7 | ACFComposer::registerFieldGroup([ |
| 8 | 8 | 'name' => 'reusableComponents', |
| 9 | 9 | 'title' => 'Reusable Components', |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Timber\Timber; |
| 6 | 6 | |
| 7 | -add_filter('Flynt/addComponentData?name=ReusableComponent', function ($data) { |
|
| 7 | +add_filter('Flynt/addComponentData?name=ReusableComponent', function($data) { |
|
| 8 | 8 | if (!empty($data['reusableId'])) { |
| 9 | 9 | $data['post'] = Timber::get_post($data['reusableId']); |
| 10 | 10 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | ]; |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | -add_filter('acf/prepare_field/name=reusableId', function ($field) { |
|
| 39 | +add_filter('acf/prepare_field/name=reusableId', function($field) { |
|
| 40 | 40 | // Update instructions with selected post link |
| 41 | 41 | if ($field['value']) { |
| 42 | 42 | $postTitle = get_the_title($field['value']); |