Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Automator_System_Report::check_if_field_item_exists( $section,  $items,  $fields )


Parameters Parameters

$section

(Required)

$items

(Required)

$fields

(Required)


Top ↑

Return Return

(bool)


Source Source

File: src/core/lib/utilities/class-automator-system-report.php

	private function check_if_field_item_exists( $section, $items, $fields ) {
		if ( ! in_array( $section, $fields, true ) ) {
			return false;
		}

		$exclude = array();
		foreach ( $fields as $field ) {
			$values = explode( '.', $field );

			if ( $section !== $values[0] || empty( $values[1] ) ) {
				continue;
			}

			$exclude[] = $values[1];
		}

		return 0 <= count( array_intersect( $items, $exclude ) );
	}