acf_field_flexible_content::get_layout_title() public ACF 1.0
{} Это метод класса: acf_field_flexible_content{}
Хуки из метода
Возвращает
Null. Ничего.
Использование
$acf_field_flexible_content = new acf_field_flexible_content(); $acf_field_flexible_content->get_layout_title( $field, $layout, $i, $value );
- $field (обязательный)
- -
- $layout (обязательный)
- -
- $i (обязательный)
- -
- $value (обязательный)
- -
Код acf_field_flexible_content::get_layout_title() acf field flexible content::get layout title ACF 5.9.1
function get_layout_title( $field, $layout, $i, $value ) {
// vars
$rows = array();
$rows[ $i ] = $value;
// add loop
acf_add_loop(array(
'selector' => $field['name'],
'name' => $field['name'],
'value' => $rows,
'field' => $field,
'i' => $i,
'post_id' => 0,
));
// vars
$title = $layout['label'];
// filters
$title = apply_filters('acf/fields/flexible_content/layout_title', $title, $field, $layout, $i);
$title = apply_filters('acf/fields/flexible_content/layout_title/name='.$field['_name'], $title, $field, $layout, $i);
$title = apply_filters('acf/fields/flexible_content/layout_title/key='.$field['key'], $title, $field, $layout, $i);
// remove loop
acf_remove_loop();
// prepend order
$order = is_numeric($i) ? $i+1 : 0;
$title = '<span class="acf-fc-layout-order">' . $order . '</span> ' . $title;
// return
return $title;
}