@mfivey Hi there! Our Pro version has the filter which allows to achieve it.
Thread Starter
mfivey
(@mfivey)
hi too. i have the PRO but i can not find it..do you have a tutorial or docu for that?
Here you go core/block/class-basic.php:453
We do not have the documentation for that purpose.
Thread Starter
mfivey
(@mfivey)
you mean this is possible with elementor pagebuilder right? we would like to use it just with coding…we dont use elementor on this project…is that possible anyhow?
You’ve asked about ACF, it’s not related to Elementor.
Thread Starter
mfivey
(@mfivey)
but the file you named me and the line…there is something about elementor…
It’s not related to Elementor, it’s a filter that you have to use:
$settings = apply_filters(sprintf(“gt3pg-pro/blocks/%s/settings”, $this->name), $settings, $this);
Thread Starter
mfivey
(@mfivey)
ok thx is ee! but how can in inject the images-array which i get from wordpress coding?
@mfivey Here is an example:
add_filter(
‘gt3pg-pro/blocks/grid/settings’,
function($settings){
// Load value (array of ids).
$images_acf = get_field(‘gallery’);
$images = array();
foreach($images_acf as $image) {
$images[] = array_merge(array(
‘id’ => $image,
‘title’ => ”,
‘caption’ => ”,
‘item_class_list’ => array(),
‘item_category_list’ => array(),
‘item_category’ => ”,
‘item_class’ => ”,
), wp_prepare_attachment_for_js($image));
}
$settings[‘ids’] = $images;
return $settings;
}
);