/*
* @int/string $thumbnail Thumbnail ID/URL
* @array $field Field settings
* @array $layout Layout settings
*/
filter('acfe/flexible/thumbnail', $thumbnail, $field, $layout);
filter('acfe/flexible/thumbnail/name=my_flexible', $thumbnail, $field, $layout);
filter('acfe/flexible/thumbnail/key=field_5ff71ef3542c2', $thumbnail, $field, $layout);
filter('acfe/flexible/thumbnail/layout=my_layout', $thumbnail, $field, $layout);
filter('acfe/flexible/thumbnail/name=my_flexible&layout=my_layout', $thumbnail, $field, $layout);
filter('acfe/flexible/thumbnail/key=field_5ff71ef3542c2&layout=my_layout', $thumbnail, $field, $layout);
add_filter('acfe/flexible/thumbnail/layout=my_layout', 'my_acf_layout_thumbnail', 10, 3);
function my_acf_layout_thumbnail($thumbnail, $field, $layout){
// Must return an URL or Attachment ID
return 'https://www.example.com/my-image.jpg';
}
/*
* @string $file File path
* @array $field Field settings
* @array $layout Layout settings
* @bool $is_preview True during admin preview
*/
filter('acfe/flexible/render/template', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/template/name=my_flexible', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/template/key=field_5ff71ef3542c2', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/template/layout=my_layout', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/template/name=my_flexible&layout=my_layout', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/template/key=field_5ff71ef3542c2&layout=my_layout', $file, $field, $layout, $is_preview);
add_filter('acfe/flexible/render/template/layout=my_layout', 'my_acf_layout_template', 10, 4);
function my_acf_layout_template($file, $field, $layout, $is_preview){
$file = get_stylesheet_directory() . '/includes/my-template.php';
// Do not include the template file
// return false;
return $file;
}
/*
* @string $file File path
* @array $field Field settings
* @array $layout Layout settings
* @bool $is_preview True during admin preview
*/
filter('acfe/flexible/render/style', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/style/name=my_flexible', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/style/key=field_5ff71ef3542c2', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/style/layout=my_layout', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/style/name=my_flexible&layout=my_layout', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/style/key=field_5ff71ef3542c2&layout=my_layout', $file, $field, $layout, $is_preview);
add_filter('acfe/flexible/render/style/layout=my_layout', 'my_acf_layout_style', 10, 4);
function my_acf_layout_style($file, $field, $layout, $is_preview){
$file = get_stylesheet_directory() . '/assets/my-template.css';
// Do not include the style file
// return false;
return $file;
}
/*
* @string $file File path
* @array $field Field settings
* @array $layout Layout settings
* @bool $is_preview True during admin preview
*/
filter('acfe/flexible/render/script', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/script/name=my_flexible', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/script/key=field_5ff71ef3542c2', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/script/layout=my_layout', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/script/name=my_flexible&layout=my_layout', $file, $field, $layout, $is_preview);
filter('acfe/flexible/render/script/key=field_5ff71ef3542c2&layout=my_layout', $file, $field, $layout, $is_preview);
add_filter('acfe/flexible/render/script/layout=my_layout', 'my_acf_layout_script', 10, 4);
function my_acf_layout_script($file, $field, $layout, $is_preview){
$file = get_stylesheet_directory() . '/assets/my-template.js';
// Do not include the style file
// return false;
return $file;
}
/*
* @array $field Field settings
* @array $layout Layout settings
* @bool $is_preview True during admin preview
*/
action('acfe/flexible/enqueue', $field, $layout, $is_preview);
action('acfe/flexible/enqueue/name=my_flexible', $field, $layout, $is_preview);
action('acfe/flexible/enqueue/key=field_5ff71ef3542c2', $field, $layout, $is_preview);
action('acfe/flexible/enqueue/layout=my_layout', $field, $layout, $is_preview);
action('acfe/flexible/enqueue/name=my_flexible&layout=my_layout', $field, $layout, $is_preview);
action('acfe/flexible/enqueue/key=field_5ff71ef3542c2&layout=my_layout', $field, $layout, $is_preview);
add_action('acfe/flexible/enqueue/name=my_flexible', 'my_acf_flexible_enqueue', 10, 3);
function my_acf_flexible_enqueue($field, $layout, $is_preview){
wp_enqueue_style('my-style', get_stylesheet_directory_uri() . '/assets/my-style.css');
}
/*
* @array $field Field settings
* @array $layout Layout settings
* @bool $is_preview True during admin preview
*/
action('acfe/flexible/render/before_template', $field, $layout, $is_preview);
action('acfe/flexible/render/before_template/name=my_flexible', $field, $layout, $is_preview);
action('acfe/flexible/render/before_template/key=field_5ff71ef3542c2', $field, $layout, $is_preview);
action('acfe/flexible/render/before_template/layout=my_layout', $field, $layout, $is_preview);
action('acfe/flexible/render/before_template/name=my_flexible&layout=my_layout', $field, $layout, $is_preview);
action('acfe/flexible/render/before_template/key=field_5ff71ef3542c2&layout=my_layout', $field, $layout, $is_preview);
add_action('acfe/flexible/render/before_template/layout=my_layout', 'my_acf_before_layout', 10, 3);
function my_acf_before_layout($field, $layout, $is_preview){
// do_something();
}
/*
* @array $field Field settings
* @array $layout Layout settings
* @bool $is_preview True during admin preview
*/
action('acfe/flexible/render/after_template', $field, $layout, $is_preview);
action('acfe/flexible/render/after_template/name=my_flexible', $field, $layout, $is_preview);
action('acfe/flexible/render/after_template/key=field_5ff71ef3542c2', $field, $layout, $is_preview);
action('acfe/flexible/render/after_template/layout=my_layout', $field, $layout, $is_preview);
action('acfe/flexible/render/after_template/name=my_flexible&layout=my_layout', $field, $layout, $is_preview);
action('acfe/flexible/render/after_template/key=field_5ff71ef3542c2&layout=my_layout', $field, $layout, $is_preview);
add_action('acfe/flexible/render/after_template/layout=my_layout', 'my_acf_after_layout', 10, 3);
function my_acf_after_layout($field, $layout, $is_preview){
// do_something();
}
This hook will change the prepend path of layouts templates displayed in the Field Group UI. This won’t affect the actual template path during inclusion.
Note this path is initially based on the theme_folder
global setting which is automatically detected by ACF Extended.
/*
* @array $prepend Prepend path (initial: /wp-content/themes/my-theme/)
* @array $field Field settings
* @bool $layout Layout settings
*/
filter('acfe/flexible/prepend/template', $prepend, $field, $layout);
filter('acfe/flexible/prepend/template/name=my_flexible', $prepend, $field, $layout);
filter('acfe/flexible/prepend/template/key=field_5ff71ef3542c2', $prepend, $field, $layout);
filter('acfe/flexible/prepend/template/layout=my_layout', $prepend, $field, $layout);
filter('acfe/flexible/prepend/template/name=my_flexible&layout=my_layout', $prepend, $field, $layout);
filter('acfe/flexible/prepend/template/key=field_5ff71ef3542c2&layout=my_layout', $prepend, $field, $layout);
add_filter('acfe/flexible/prepend/template/layout=my_layout', 'my_acf_layout_template_prepend', 10, 3);
function my_acf_layout_template_prepend($prepend, $field, $layout){
$prepend = '/custom/';
return $prepend;
}
This hook will change the prepend path of layouts styles displayed in the Field Group UI. This won’t affect the actual style path during inclusion.
Note this path is initially based on the theme_folder
global setting which is automatically detected by ACF Extended.
/*
* @array $prepend Prepend path (initial: /wp-content/themes/my-theme/)
* @array $field Field settings
* @bool $layout Layout settings
*/
filter('acfe/flexible/prepend/style', $prepend, $field, $layout);
filter('acfe/flexible/prepend/style/name=my_flexible', $prepend, $field, $layout);
filter('acfe/flexible/prepend/style/key=field_5ff71ef3542c2', $prepend, $field, $layout);
filter('acfe/flexible/prepend/style/layout=my_layout', $prepend, $field, $layout);
filter('acfe/flexible/prepend/style/name=my_flexible&layout=my_layout', $prepend, $field, $layout);
filter('acfe/flexible/prepend/style/key=field_5ff71ef3542c2&layout=my_layout', $prepend, $field, $layout);
add_filter('acfe/flexible/prepend/style/layout=my_layout', 'my_acf_layout_style_prepend', 10, 3);
function my_acf_layout_style_prepend($prepend, $field, $layout){
$prepend = '/custom/';
return $prepend;
}
This hook will change the prepend path of layouts scripts displayed in the Field Group UI. This won’t affect the actual script path during inclusion.
Note this path is initially based on the theme_folder
global setting which is automatically detected by ACF Extended.
/*
* @array $prepend Prepend path (initial: /wp-content/themes/my-theme/)
* @array $field Field settings
* @bool $layout Layout settings
*/
filter('acfe/flexible/prepend/script', $prepend, $field, $layout);
filter('acfe/flexible/prepend/script/name=my_flexible', $prepend, $field, $layout);
filter('acfe/flexible/prepend/script/key=field_5ff71ef3542c2', $prepend, $field, $layout);
filter('acfe/flexible/prepend/script/layout=my_layout', $prepend, $field, $layout);
filter('acfe/flexible/prepend/script/name=my_flexible&layout=my_layout', $prepend, $field, $layout);
filter('acfe/flexible/prepend/script/key=field_5ff71ef3542c2&layout=my_layout', $prepend, $field, $layout);
add_filter('acfe/flexible/prepend/script/layout=my_layout', 'my_acf_layout_script_prepend', 10, 3);
function my_acf_layout_script_prepend($prepend, $field, $layout){
$prepend = '/custom/';
return $prepend;
}