corcel / acf

Advanced Custom Fields (ACF) plugin for Corcel
126 stars 98 forks source link

Add support for custom ACF fields #88

Open codemonkeynorth opened 4 years ago

codemonkeynorth commented 4 years ago

We are currently using this https://github.com/joppuyo/acf-image-aspect-ratio-crop

which creates a field type image_aspect_ratio_crop

I can seemingly use it by adapting FieldFactory.php

case 'image':
case 'img':
case 'image_aspect_ratio_crop': // <= added this
  $field = new Image($post);

Would be good to be able to define that dynamically, but I'm guessing the internal field mapping won't necessarily be the same?