ACF\Pro\Fields\FlexibleContent
Layout::get_title
Returns the filtered layout title.
Method of the class: Layout{}
Hooks from the method
Returns
string.
Usage
$Layout = new Layout(); $Layout->get_title();
Changelog
| Since 6.5 | Introduced. |
Layout::get_title() Layout::get title code ACF 6.8.8
public function get_title() {
$rows = array();
$rows[ $this->order ] = $this->value;
acf_add_loop(
array(
'selector' => $this->field['name'],
'name' => $this->field['name'],
'value' => $rows,
'field' => $this->field,
'i' => $this->order,
'post_id' => 0,
)
);
// Make the title filterable.
$title = esc_html( $this->layout['label'] );
$title = apply_filters( 'acf/fields/flexible_content/layout_title', $title, $this->field, $this->layout, $this->order );
$title = apply_filters( 'acf/fields/flexible_content/layout_title/name=' . $this->field['_name'], $title, $this->field, $this->layout, $this->order );
$title = apply_filters( 'acf/fields/flexible_content/layout_title/key=' . $this->field['key'], $title, $this->field, $this->layout, $this->order );
$title = acf_esc_html( $title );
acf_remove_loop();
reset_rows(); // TODO: Make sure this is actually where this should go if needed at all.
return $title;
}