acf_field_flexible_content::get_layout_title()publicACF 1.0

Метод класса: acf_field_flexible_content{}

Возвращает

null. Ничего (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 6.0.4

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> ' . acf_esc_html( $title );

	// return
	return $title;

}