acf_field_flexible_content::get_disabled_layoutspublicACF 6.5

Returns an array of layouts that have been disabled for the current field.

Method of the class: acf_field_flexible_content{}

No Hooks.

Returns

array.

Usage

$acf_field_flexible_content = new acf_field_flexible_content();
$acf_field_flexible_content->get_disabled_layouts( $post_id, $field ): array;
$post_id(int|string) (required)
The ID of the post being edited.
$field(array) (required)
The Flexible Content field array.

Changelog

Since 6.5 Introduced.

acf_field_flexible_content::get_disabled_layouts() code ACF 6.8.8

public function get_disabled_layouts( $post_id, $field ): array {
	$layout_meta = $this->get_layout_meta( $post_id, $field );

	if ( empty( $layout_meta['disabled'] ) || ! is_array( $layout_meta['disabled'] ) ) {
		return array();
	}

	return $layout_meta['disabled'];
}