WP_View_Config_Data::remove_list_member( array $members, mixed $identity ): array

In this article

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

Removes the first list member matching an identity, leaving the rest.

Parameters

$membersarrayrequired
The current list.
$identitymixedrequired
The identity of the member to remove.

Return

array The list with the matching member removed, if any.

Source

private function remove_list_member( array $members, $identity ) {
	foreach ( $members as $index => $member ) {
		if ( $this->list_item_identity( $member ) === (string) $identity ) {
			unset( $members[ $index ] );
			break;
		}
	}

	return $members;
}

Changelog

VersionDescription
7.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.