Tribe__Utils__Post_Collection::pluck_field( string $field )

Plucks a post field from all posts in the collection.

Note: there is no check on the name of the plucked post field: if a non-existing post field is requested, then the method will return an empty array.


Parameters #

$field

(string) (Required) The name of the post field to pluck.


Top ↑

Return #

(array<string>) A list of the plucked post fields from each item in the collection.


Top ↑

Source #

File: src/Tribe/Utils/Post_Collection.php

	public function pluck_field( $field ) {
		return wp_list_pluck( $this->items, $field );
	}

Top ↑

Changelog #

Changelog
Version Description
4.12.6 Introduced.