/** * Fetch image data that has been stored by means of an ACF repeater field * * The subfield name is assumed to be 'image'. * * * @param string $fieldname The fieldname * @param string $image_size Required image size * @return array Array of image data */ public static function carousel_data($fieldname, array $subfields, $image_size) { $data = new \Carawebs\LamhEile\Fetch\PostMeta(get_the_ID()); $subfields = ['image' => ['image_ID', $image_size], $subfields[1] => 'text']; return $data->repeater($fieldname, $subfields); }
public static function get_cta_data($fieldname, $type) { $data = new \Carawebs\LamhEile\Fetch\PostMeta(get_the_ID()); return $data->field_output($fieldname, $type); }
public static function testimonials_data() { $data = new \Carawebs\LamhEile\Fetch\PostMeta(get_the_ID()); $subfields = ['text' => 'text', 'name' => 'text', 'company' => 'text']; return $data->repeater('testimonials', $subfields); }